diff --git a/templates/home/index.html b/templates/home/index.html index ee1c4fb..80a7739 100644 --- a/templates/home/index.html +++ b/templates/home/index.html @@ -3,19 +3,23 @@ {% block content %}
-

Gambling Foo A RESTful gaming service

+

Cowiz Gambling Den A RESTful gaming service

- Play a nice game of cards?
+ Play a nice game of cards!

Endpoints

diff --git a/views/player.py b/views/player.py index f223b49..c8fe823 100644 --- a/views/player.py +++ b/views/player.py @@ -19,7 +19,7 @@ def show(req, resp, player: str): #active_player = the_game.active_player prev_player = the_game.get_prev_player() - if tcard.value == 'Z' and tcolor == '-': + if tcard and tcard.value == 'Z' and tcolor == '-': choose_trump_color = True else: choose_trump_color = False diff --git a/wiz_game.py b/wiz_game.py index beec352..51b97c2 100644 --- a/wiz_game.py +++ b/wiz_game.py @@ -130,7 +130,7 @@ class WizGame: high_player, high_card = cards[0] for player, card in cards[1:]: - if get_higher_card(high_card, card, self.trump_card.color): + if get_higher_card(high_card, card, self.trump_card.color if self.trump_card else '-'): high_card = card high_player = player return high_player, high_card @@ -198,6 +198,6 @@ class WizGame: return self.start_player-1 -p = ["p1", "p2", "p3", "p4"] +p = ["Astrid", "Stephan", "Patrice", "struppi"] the_game = WizGame(p)