summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--play.html11
-rw-r--r--rules.js2
-rw-r--r--ui.js7
3 files changed, 13 insertions, 7 deletions
diff --git a/play.html b/play.html
index 60dc10c..db486ce 100644
--- a/play.html
+++ b/play.html
@@ -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">
diff --git a/rules.js b/rules.js
index f7c089d..d549727 100644
--- a/rules.js
+++ b/rules.js
@@ -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,
};
diff --git a/ui.js b/ui.js
index 1751566..7f03005 100644
--- a/ui.js
+++ b/ui.js
@@ -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");