diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-26 00:33:08 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-26 00:33:08 +0200 |
commit | ea8755f9fe54ea911cdd864c5cfc01d708bdafb4 (patch) | |
tree | 06a0cc78fac3d93fd8bf4fa90294cf2d8f5cbf77 /play.js | |
parent | f71d3ff7dd4e6b4536049fe034e934182cb36cf4 (diff) | |
download | 1989-dawn-of-freedom-ea8755f9fe54ea911cdd864c5cfc01d708bdafb4.tar.gz |
add played power card panel
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -40,6 +40,7 @@ const ui = { event_reminder_list: document.getElementById("event_reminder_list"), played_card: document.getElementById("played_card"), + played_power_card: document.getElementById("played_power_card"), hand: document.getElementById("hand"), power_hand: document.getElementById("power_hand"), opp_hand: document.getElementById("opp_hand"), @@ -372,6 +373,10 @@ function on_update() { if (view.played_card > 0) ui.played_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]) + ui.samizdat_card.replaceChildren() if (view.samizdat > 0) ui.samizdat_card.appendChild(ui.cards[view.samizdat]) @@ -383,7 +388,7 @@ function on_update() { ui.power_hand.replaceChildren() if (view.power_hand) for (let c of view.power_hand) - ui.hand.appendChild(ui.power_cards[c]) + ui.power_hand.appendChild(ui.power_cards[c]) ui.opp_hand.replaceChildren() if (view.opp_hand) |