From ea1e0d445204857be2e0d3250d45200266f8b02b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 4 Oct 2022 15:24:55 +0200 Subject: Drop the turn info row in the sidebar. Show card commitment in player rows as commitment + hand size. --- play.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'play.js') 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)) -- cgit v1.2.3