diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-27 07:54:11 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-27 07:54:11 +0000 |
commit | 129fca876d1efb7b238e277fc82c6589d52ac016 (patch) | |
tree | 24c6a0f49fff9c4fc2226ee611e89ff816b1c348 /play.js | |
parent | c2df9cc16c98db5286509e2bf6deef028b111fac (diff) | |
download | 1989-dawn-of-freedom-129fca876d1efb7b238e277fc82c6589d52ac016.tar.gz |
Working on power cards during struggle
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -40,6 +40,7 @@ const ui = { event_reminder_list: document.getElementById("event_reminder_list"), played_card: document.getElementById("played_card"), + scoring_card: document.getElementById("scoring_card"), played_power_card: document.getElementById("played_power_card"), hand: document.getElementById("hand"), power_hand: document.getElementById("power_hand"), @@ -370,9 +371,14 @@ function on_update() { // UPDATE CARD DISPLAYS ui.played_card.replaceChildren() - if (view.played_card > 0) - ui.played_card.appendChild(ui.cards[view.played_card]) - + + if (!view.is_pwr_struggle) { + if (view.played_card > 0) + ui.played_card.appendChild(ui.cards[view.played_card]) + } else { + if (view.played_card > 0) + ui.scoring_card.appendChild(ui.cards[view.played_card]) + } ui.played_power_card.replaceChildren() if (view.played_power_card > 0) ui.played_power_card.appendChild(ui.power_cards[view.played_power_card]) |