game: add: player can leave and join game
This commit is contained in:
@ -98,7 +98,7 @@ class Game(AbstractRoom):
|
||||
return player
|
||||
|
||||
def _player_leave(self, player: Player):
|
||||
# TODO send data to all players
|
||||
self.broadcast("player_leave", player.to_dict(), [player])
|
||||
self.players.remove(player)
|
||||
|
||||
def _spectator_join(self, user_id: int, socket: WebsocketConsumer):
|
||||
|
Reference in New Issue
Block a user