summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-10-27 07:54:11 +0000
committeriainp5 <iain.pearce.ip@gmail.com>2024-10-27 07:54:11 +0000
commit129fca876d1efb7b238e277fc82c6589d52ac016 (patch)
tree24c6a0f49fff9c4fc2226ee611e89ff816b1c348 /play.js
parentc2df9cc16c98db5286509e2bf6deef028b111fac (diff)
download1989-dawn-of-freedom-129fca876d1efb7b238e277fc82c6589d52ac016.tar.gz
Working on power cards during struggle
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/play.js b/play.js
index 03f58f5..3acf3e8 100644
--- a/play.js
+++ b/play.js
@@ -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])