diff options
| author | Olivier Gayot <duskcoder@gmail.com> | 2015-06-04 03:07:31 +0100 |
|---|---|---|
| committer | Olivier Gayot <duskcoder@gmail.com> | 2015-06-04 03:07:31 +0100 |
| commit | bc055cda47021daa7220820ed4825f83ab1cc0ee (patch) | |
| tree | 975c8772d665d7277f2ccca5888f4aa09184eed4 | |
| parent | 987057dc0b8892e38cf39005f96c655ac76e19bf (diff) | |
implement a way to view the black card
Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
| -rw-r--r-- | CAO_Client.py | 5 | ||||
| -rw-r--r-- | CAO_Game.py | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/CAO_Client.py b/CAO_Client.py index 3132e57..67ce54f 100644 --- a/CAO_Client.py +++ b/CAO_Client.py @@ -47,3 +47,8 @@ class CAO_Client(): if self.game is None: return cao_error('You have to join a game first') return self.game.try_view_played_cards(self.player) + + def view_black_card(self): + if self.game is None: + return cao_error('You have to join a game first') + return self.game.try_view_black_card(self.player) diff --git a/CAO_Game.py b/CAO_Game.py index ed446ee..54bbf48 100644 --- a/CAO_Game.py +++ b/CAO_Game.py @@ -149,3 +149,9 @@ class CAO_Game(): cards.append(self.white_desc[card]) return cao_success(cards) + + def try_view_black_card(self, player): + card = self.board.current_black_card + + if card is not None: + return cao_success(self.black_desc[card]) |
