From 0c9ee93b7381e9a198ff1efa6703d4cb68a0b58d Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Fri, 15 May 2020 02:35:56 +0200 Subject: Don't pass the cards to the constructor of board Signed-off-by: Olivier Gayot --- swiftstory/Game.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'swiftstory/Game.py') diff --git a/swiftstory/Game.py b/swiftstory/Game.py index 9dd19c4..7cd7d15 100644 --- a/swiftstory/Game.py +++ b/swiftstory/Game.py @@ -1,4 +1,5 @@ import json +import random from swiftstory.Player import Player from swiftstory.Board import Board @@ -23,7 +24,12 @@ class Game: self.judge = None - self.board = Board(white_pick, black_pick) + self.board = Board() + self.board.white_pick = white_pick + self.board.black_pick = black_pick + + random.shuffle(self.board.white_pick) + random.shuffle(self.board.black_pick) async def try_join(self, client): if len(self.players) >= 10: -- cgit v1.2.3