Archived
This commit is contained in:
@@ -175,7 +175,7 @@ class ClientController:
|
||||
# "update", self.player.team.serialize_guest()
|
||||
# )
|
||||
|
||||
if self.game_controller.game.ended == True:
|
||||
if self.game_controller.game.ended is True:
|
||||
return await self.send_error("game is already finished!")
|
||||
if self.player.team != self.game_controller.game.current_turn:
|
||||
return await self.send_error("it is not your turn to play!")
|
||||
|
||||
@@ -28,6 +28,7 @@ class Game(Serializable):
|
||||
teams: List[Team]
|
||||
|
||||
started: bool
|
||||
ended: bool
|
||||
|
||||
default_health = 50
|
||||
|
||||
@@ -46,6 +47,7 @@ class Game(Serializable):
|
||||
self.teams: List[Team] = []
|
||||
|
||||
self.started = False
|
||||
self.ended = False
|
||||
|
||||
self.current_turn = None
|
||||
|
||||
@@ -187,3 +189,4 @@ class Game(Serializable):
|
||||
|
||||
def end_game(self):
|
||||
self.lobby.remove(self)
|
||||
self.ended = True
|
||||
|
||||
Reference in New Issue
Block a user