From 6f4d6a42cb212ffff2e13bdde0678d7e7b56691c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 4 Nov 2023 12:21:35 +0100 Subject: add extra (hidden) panel to show pool of unused units --- play.html | 7 ++++++- play.js | 7 ++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/play.html b/play.html index 2fce514..5f1131d 100644 --- a/play.html +++ b/play.html @@ -645,10 +645,15 @@ svg .area.tip {
-
Eliminated / Out of Play
+
Eliminated
+
+
Unused
+
+
+ diff --git a/play.js b/play.js index 2c0cf85..50bcb61 100644 --- a/play.js +++ b/play.js @@ -29,7 +29,7 @@ var ORAN = data.locations["ORAN"] var ALGIERS = data.locations["ALGIERS"] var CONSTANTINE = data.locations["CONSTANTINE"] -const OUT_OF_PLAY = 0 +const UNUSED = 0 const DEPLOY = 1 const ELIMINATED = 2 @@ -236,6 +236,7 @@ let ui = { fln_supply: document.getElementById("fln_supply"), gov_supply: document.getElementById("gov_supply"), eliminated: document.getElementById("eliminated"), + unused: document.getElementById("unused"), } const LAYOUT_BOX = [] @@ -767,8 +768,8 @@ function update_map() { let e = ui.units[u] let loc = unit_loc(u) switch (loc) { - case OUT_OF_PLAY: - e.remove() + case UNUSED: + ui.unused.appendChild(e) break case DEPLOY: if (is_gov_unit(u)) -- cgit v1.2.3