From e9faa90b9e3c8138b5d4763a2d8279f61486238c Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 23 Dec 2021 22:49:35 +0100 Subject: Avoid dependency on Client from Game Signed-off-by: Olivier Gayot --- swiftstory/game.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'swiftstory/game.py') diff --git a/swiftstory/game.py b/swiftstory/game.py index f6dca14..1655d73 100644 --- a/swiftstory/game.py +++ b/swiftstory/game.py @@ -30,7 +30,7 @@ class Game: random.shuffle(self.board.white_pick) random.shuffle(self.board.black_pick) - def try_join(self, client): + def try_join(self, player): if len(self.players) >= 10: raise JoinError('too many players in this game') @@ -42,16 +42,9 @@ class Game: except IndexError: raise JoinError('not enough white cards for player') - player = Player() - for card in cards: player.receive_card(card) - client.player = player - client.game = self - - client.monitor_player() - self.players.append(player) for p in self.players: -- cgit v1.2.3