diff options
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") |