clean: rm online tournament

This commit is contained in:
2024-05-13 16:49:10 +02:00
parent ae76b82169
commit bb6353f578
25 changed files with 2 additions and 1196 deletions

View File

@ -6,8 +6,6 @@ from .ASpectator import ASpectator
from ..models import GameModel
from tournament.models import TournamentGameModel
from django.contrib.auth.models import User
class AGame(AbstractRoom):
@ -18,11 +16,7 @@ class AGame(AbstractRoom):
self.game_manager = game_manager
query = TournamentGameModel.objects.filter(pk = game_id, game_type = game_type)
if (query.exists()):
self.model: TournamentGameModel | GameModel = query[0]
else:
self.model: TournamentGameModel | GameModel = GameModel.objects.get(pk = game_id, game_type = game_type)
self.model: GameModel = GameModel.objects.get(pk = game_id, game_type = game_type)
players: list[User] = self.model.get_players()

View File

@ -3,8 +3,6 @@ from ..models import GameModel
from .pong.PongGame import PongGame
from .tictactoe.TicTacToeGame import TicTacToeGame
from tournament.models import TournamentGameModel
class GameManager():
def __init__(self) -> None: