From 292120aeb5611d0b9c2b54f54c89cd9cb96f2a4b Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Thu, 23 Dec 2021 17:09:15 +0100 Subject: Feed the picks directly to the board, without storing them first Signed-off-by: Olivier Gayot --- swiftstory/game.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/swiftstory/game.py b/swiftstory/game.py index 4a7f009..f6dca14 100644 --- a/swiftstory/game.py +++ b/swiftstory/game.py @@ -16,8 +16,6 @@ class GameState(Enum): class Game: def __init__(self, white_desc, black_desc): - white_pick = list(enumerate(white_desc)) - black_pick = list(enumerate(black_desc)) self.state = GameState.WAITING_NEW_JUDGE @@ -26,8 +24,8 @@ class Game: self.judge: Optional[Player] = None self.board = Board() - self.board.white_pick = white_pick - self.board.black_pick = black_pick + self.board.white_pick = list(enumerate(white_desc)) + self.board.black_pick = list(enumerate(black_desc)) random.shuffle(self.board.white_pick) random.shuffle(self.board.black_pick) -- cgit v1.2.3