diff --git a/server.py b/server.py index 84bcb63..768259c 100755 --- a/server.py +++ b/server.py @@ -18,10 +18,10 @@ def main(): #wiz_game.the_game.add_player("p3", 3) #wiz_game.the_game.add_player("p4", 4) #wiz_game.the_game.deal_cards(12) - wiz_game.the_game.add_player("p1", 1) - wiz_game.the_game.add_player("p2", 2) - wiz_game.the_game.add_player("p3", 3) - wiz_game.the_game.add_player("p4", 4) + wiz_game.the_game.add_player("p1") + wiz_game.the_game.add_player("p2") + wiz_game.the_game.add_player("p3") + wiz_game.the_game.add_player("p4") wiz_game.the_game.init_game() diff --git a/templates/home/control.html b/templates/home/control.html index 9bacbbd..f1d56b3 100644 --- a/templates/home/control.html +++ b/templates/home/control.html @@ -14,10 +14,19 @@ >{{loop.index}}: {{card}} | {% endfor %} -
diff --git a/templates/home/player.html b/templates/home/player.html index 73acbc2..d2a03ef 100644 --- a/templates/home/player.html +++ b/templates/home/player.html @@ -7,10 +7,17 @@
Play a nice game of cards?
- Player {{player}} view
+ Player {{player+1}} view
Table
- {% for key,value in played_cards.items() %}
- || {{key.name}}: {{value}}
+ {% for player,card in played_cards %}
+ ||
+ {% if player.id == active_player %}
+
+ {% endif %}
+ {{player.name}}: {{card}}
+ {% if player.id == active_player %}
+
+ {% endif %}
{% endfor %}
||
@@ -24,11 +31,18 @@
{% for card in cards %}