From 0d09d30e9d34100c60b54e7a264b7430cf756347 Mon Sep 17 00:00:00 2001 From: iainp5 Date: Thu, 10 Oct 2024 16:39:03 +0100 Subject: Added permanently removed view --- play.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'play.js') diff --git a/play.js b/play.js index 2c4d482..7ae8644 100644 --- a/play.js +++ b/play.js @@ -557,6 +557,16 @@ if(view.discard) { } } +// UPDATE PERMANENTLY REMOVED CARDS +document.getElementById("removed").replaceChildren() +for (let c of view.strategy_removed) { + let discard_card = ui.cards[c] + document.getElementById("removed").appendChild(discard_card) + discard_card.classList.add('discard_card') + discard_card.classList.remove('selected') +} + + // PLAYED CARD PANEL if (view.played_card > 0) { document.getElementById("played_card_panel").classList.remove("hide") @@ -841,6 +851,10 @@ function toggle_discard() { document.getElementById("discard_panel").classList.toggle("hide") } +function toggle_removed() { + document.getElementById("removed_panel").classList.toggle("hide") +} + function check_dem_control(demInfl, comInfl, space) { if ((demInfl - comInfl) >= space.stability) { return true -- cgit v1.2.3