diff options
-rw-r--r-- | play.html | 11 | ||||
-rw-r--r-- | rules.js | 2 | ||||
-rw-r--r-- | ui.js | 7 |
3 files changed, 13 insertions, 7 deletions
@@ -33,11 +33,11 @@ background-color: gainsboro; white-space: pre-wrap; } -.last_played { +.role_info.card_info { background-color: silver; } -.last_played .card { - margin: 15px auto; +#deck_info { + text-align: center; } .grid_role { width: 240px; @@ -70,7 +70,8 @@ border-radius: 12px; } -.role_info .card { +.card_info .card { + margin: 15px auto; width: 200px; height: 280px; border-radius: 10px; @@ -268,7 +269,7 @@ <div class="role_info" id="persian_info">0 cards in hand</div> </div> - <div class="role_info last_played"><div id="last_played" class="card show card_back"></div></div> + <div class="role_info card_info"><div id="discard" class="card show card_back"></div><div id="deck_info"></div></div> </div> <div class="grid_log"> @@ -3233,6 +3233,8 @@ exports.view = function(state, current) { active: game.active, campaign: game.campaign, vp: game.vp, + deck_size: game.deck.length - game.greek.draw - game.persian.draw, + discard_size: game.discard.length, trigger: game.trigger, units: game.units, }; @@ -261,9 +261,12 @@ function on_update(state, player) { document.getElementById("persian_info").textContent = persian_info(); if (!game.discard) - document.getElementById("last_played").className = "card show card_back"; + document.getElementById("discard").className = "card show card_back"; else - document.getElementById("last_played").className = "card show card_" + game.discard; + document.getElementById("discard").className = "card show card_" + game.discard; + + document.getElementById("deck_info").textContent = + "Deck: " + game.deck_size + " \u2014 Discard: " + game.discard_size; show_action_button("#button_battle", "battle"); show_action_button("#button_build", "build"); |