diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-10-04 15:24:55 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:28 +0100 |
commit | ea1e0d445204857be2e0d3250d45200266f8b02b (patch) | |
tree | 5d683f87f90ea631ad0fa3a60cf5a9a08ed7b1e9 /play.js | |
parent | bd1c2fc7a716faff5dda84baf5e7a052b19a5b25 (diff) | |
download | rommel-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.js | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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)) |