From ea8755f9fe54ea911cdd864c5cfc01d708bdafb4 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 26 Oct 2024 00:33:08 +0200 Subject: add played power card panel --- play.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'play.js') diff --git a/play.js b/play.js index 4658044..770e6d5 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"), + 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) -- cgit v1.2.3