tournament: game: finish event
This commit is contained in:
@ -3,6 +3,8 @@ 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:
|
||||
@ -14,7 +16,7 @@ class GameManager():
|
||||
self._game_list.remove(game)
|
||||
|
||||
def get(self, game_id: int, game_type: str) -> TicTacToeGame | PongGame:
|
||||
|
||||
|
||||
if (not GameModel.objects.filter(pk=game_id, finished=False, game_type=game_type).exists()):
|
||||
return None
|
||||
|
||||
|
Reference in New Issue
Block a user