diff options
author | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-03-09 13:38:22 +0100 |
---|---|---|
committer | Olivier Gayot <olivier.gayot@sigexec.com> | 2018-03-09 13:38:22 +0100 |
commit | 493b116f73ec3912ca7af3d6ece3434279cbcfb5 (patch) | |
tree | b6955491311fb0d810e9de9a7dd9b8059d04a10c /CAO/Board.py | |
parent | 735bc5af0929392f27386aa3fa0c26d39f300672 (diff) |
renamed the project SwiftStory
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
Diffstat (limited to 'CAO/Board.py')
-rw-r--r-- | CAO/Board.py | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/CAO/Board.py b/CAO/Board.py deleted file mode 100644 index 4f4e7c6..0000000 --- a/CAO/Board.py +++ /dev/null @@ -1,55 +0,0 @@ -import random - -class Board(): - def __init__(self, white_cards, black_cards): - self.white_pick = white_cards - self.black_pick = black_cards - - self.white_recycled = [] - self.black_recycled = [] - - self.current_black_card = None - - # tupple of cards / player currently being played - self.played_cards = [] - - random.shuffle(self.white_pick) - random.shuffle(self.black_pick) - - def reveal_black_card(self): - if not self.black_pick: - self.black_pick = self.black_recycle - - random.shuffle(self.black_pick) - - self.black_recycled = [] - - card = self.black_pick.pop() - - self.current_black_card = card - - def recycle_black_card(self): - self.black_recycled.append(self.current_black_card) - - def pick_white_card(self): - if not self.white_pick: - self.white_pick = self.white_recycled - - random.shuffle(self.white_pick) - - self.white_recycled = [] - - card = self.white_pick.pop() - - return card - - 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] - - self.played_cards = [] |