summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-10-04 15:24:55 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:28 +0100
commitea1e0d445204857be2e0d3250d45200266f8b02b (patch)
tree5d683f87f90ea631ad0fa3a60cf5a9a08ed7b1e9 /play.js
parentbd1c2fc7a716faff5dda84baf5e7a052b19a5b25 (diff)
downloadrommel-in-the-desert-ea1e0d445204857be2e0d3250d45200266f8b02b.tar.gz
Drop the turn info row in the sidebar.
Show card commitment in player rows as commitment + hand size.
Diffstat (limited to 'play.js')
-rw-r--r--play.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/play.js b/play.js
index 99865f0..388984d 100644
--- a/play.js
+++ b/play.js
@@ -93,7 +93,6 @@ let ui = {
months: [],
axis_supply: document.getElementById("axis_supply"),
allied_supply: document.getElementById("allied_supply"),
- turn_info: document.getElementById("turn_info"),
hand: document.getElementById("hand"),
battle: document.getElementById("battle"),
battle_hits: [
@@ -1015,9 +1014,15 @@ function on_update() {
else
ui.pursuit.classList.add("hide")
- ui.axis_supply.textContent = view.axis_hand
- ui.allied_supply.textContent = view.allied_hand
- ui.turn_info.textContent = `Month: ${view.month} / ${view.end}\nSupply Commitment: ${view.commit}`
+ if (view.phasing === "Axis" && view.commit >= 0)
+ ui.axis_supply.textContent = view.commit + " + " + view.axis_hand
+ else
+ ui.axis_supply.textContent = view.axis_hand
+
+ if (view.phasing === "Allied" && view.commit >= 0)
+ ui.allied_supply.textContent = view.commit + " + " + view.allied_hand
+ else
+ ui.allied_supply.textContent = view.allied_hand
for (let i = 0; i < 28; ++i)
ui.cards[i].classList.toggle("action", !!(view.actions && view.actions.real_card))