diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-07-28 15:02:48 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:26 +0100 |
commit | 1a29b9c975564261bfe4c715223f535bb71d8f09 (patch) | |
tree | f717b1c0cd2615e4c28e64eec45580387b12f2e6 /play.js | |
parent | 9fb38f18590120409dea918132ccf437958de734 (diff) | |
download | rommel-in-the-desert-1a29b9c975564261bfe4c715223f535bb71d8f09.tar.gz |
Buildup turn structure. Resupply. Initiative challenge.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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") |