diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-28 17:37:01 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-10-28 17:37:01 +0000 |
commit | 6a884f647be0060cbdab7300a8afa850425a60a1 (patch) | |
tree | ec2ad83f4a95731070befff558a74b4b7bf40988 /play.js | |
parent | abaad8ee7552e1d40ca12a100d737e789d53e733 (diff) | |
download | 1989-dawn-of-freedom-6a884f647be0060cbdab7300a8afa850425a60a1.tar.gz |
Tor updates
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -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)) |