From 6a884f647be0060cbdab7300a8afa850425a60a1 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Mon, 28 Oct 2024 17:37:01 +0000 Subject: Tor updates --- play.js | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/play.js b/play.js index bfe4578..8b5d3d7 100644 --- a/play.js +++ b/play.js @@ -370,17 +370,13 @@ 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"), - power_card_1: document.getElementById("power_card_1"), - power_card_2: document.getElementById("power_card_2"), hand: document.getElementById("hand"), power_hand: document.getElementById("power_hand"), opp_hand: document.getElementById("opp_hand"), opp_power_hand: document.getElementById("opp_power_hand"), discard: document.getElementById("discard"), removed: document.getElementById("removed"), - table_cards: document.getElementById("table_cards"), + persistent: document.getElementById("persistent"), ceausescu_hand: document.getElementById("ceausescu_hand"), samizdat_card: document.getElementById("samizdat_card"), @@ -703,15 +699,20 @@ function on_update() { document.getElementById("discard_panel").classList.add("hide") ui.removed.replaceChildren() - for (let c of view.strategy_removed) { - if (c === view.played_card) continue - ui.removed.appendChild(ui.cards[c]) } + for (let c of view.strategy_removed) + ui.removed.appendChild(ui.cards[c]) + + ui.persistent.replaceChildren() + for (let c of view.persistent_events) + ui.persistent.appendChild(ui.cards[c]) - ui.table_cards.replaceChildren() - if (view.table_cards) - for (let c of view.table_cards) { - if (c === view.played_card) continue - ui.table_cards.appendChild(ui.cards[c]) } + ui.played_card.replaceChildren() + if (view.played_card > 0) + ui.played_card.appendChild(ui.cards[view.played_card]) + if (view.power_card_1 > 0) + ui.played_card.appendChild(ui.power_cards[view.power_card_1]) + if (view.power_card_2 > 0) + ui.played_card.appendChild(ui.power_cards[view.power_card_2]) for (let e of action_register) e.classList.toggle("action", is_action(e.my_action, e.my_id)) -- cgit v1.2.3