From 1a29b9c975564261bfe4c715223f535bb71d8f09 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Thu, 28 Jul 2022 15:02:48 +0200 Subject: Buildup turn structure. Resupply. Initiative challenge. --- play.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index ef1ed55..4cdbaf3 100644 --- a/play.js +++ b/play.js @@ -709,10 +709,10 @@ function on_update() { ui.allied_supply.textContent = view.allied_hand ui.turn_info.textContent = `Month: ${view.month}\nSupply Commitment: ${view.commit}` - if (view.actions && (view.actions.real_card || view.actions.dummy_card)) - ui.cards.forEach(elt => elt.classList.add("action")) - else - ui.cards.forEach(elt => elt.classList.remove("action")) + for (let i = 0; i < 28; ++i) + ui.cards[i].classList.toggle("action", !!(view.actions && view.actions.real_card)) + for (let i = 0; i < 14; ++i) + ui.cards[i+28].classList.toggle("action", !!(view.actions && view.actions.dummy_card)) action_button("discard", "Discard") action_button("keep", "Keep") -- cgit v1.2.3