summaryrefslogtreecommitdiff
path: root/swiftstory/game.py
diff options
context:
space:
mode:
authorOlivier Gayot <olivier.gayot@sigexec.com>2021-12-23 22:49:35 +0100
committerOlivier Gayot <olivier.gayot@sigexec.com>2021-12-23 23:15:21 +0100
commite9faa90b9e3c8138b5d4763a2d8279f61486238c (patch)
treecf8e4dc745caaf3f2da780a8c5e471ef10a13a73 /swiftstory/game.py
parent041f3e63118837acaa2316139dd9ca6c796a79e6 (diff)
Avoid dependency on Client from Game
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'swiftstory/game.py')
-rw-r--r--swiftstory/game.py9
1 files changed, 1 insertions, 8 deletions
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: