diff options
author | Olivier Gayot <duskcoder@gmail.com> | 2015-06-04 00:21:20 +0100 |
---|---|---|
committer | Olivier Gayot <duskcoder@gmail.com> | 2015-06-04 00:21:20 +0100 |
commit | f0a97bcd1306a0d09467b41a1989b3b784f8f2e5 (patch) | |
tree | 84a9ec83807c6b7a29be376212a06eb841f648ba | |
parent | 1ee77bcb1df495f52aa7633a3d857db19720bbea (diff) |
shuffle the played cards before designing
the judge tends to know with card belong to who if he can see the order
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
-rw-r--r-- | CAO_Board.py | 3 | ||||
-rw-r--r-- | CAO_Game.py | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/CAO_Board.py b/CAO_Board.py index 925b1ee..0fd595b 100644 --- a/CAO_Board.py +++ b/CAO_Board.py @@ -46,6 +46,9 @@ class CAO_Board(): def play_card(self, player, card): self.played_cards.append((card, player)) + def shuffle_played_cards(self): + random.shuffle(self.played_cards) + def recycle_played_cards(self): self.white_recycled += [i[0] for i in self.played_cards] diff --git a/CAO_Game.py b/CAO_Game.py index dfa7841..0502b88 100644 --- a/CAO_Game.py +++ b/CAO_Game.py @@ -85,6 +85,8 @@ class CAO_Game(): if self.judge is not player: return ('ERR', 'You\'re not the judge, you fool!') + self.board.shuffle_played_cards() + # we prevent the others to play self.state = self.WAITING_DESIGNATION |