summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-31 00:37:17 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:26 +0100
commit3dec7b3400c1e75027881a65620c5c908365a36c (patch)
tree6eeb1d12dbaf6996cb2ad06e6153ec16582359e8 /play.js
parentd109a4fa1d646c7f1066d86e5f1ca01ce9bc00cc (diff)
downloadrommel-in-the-desert-3dec7b3400c1e75027881a65620c5c908365a36c.tar.gz
Color tables to match.
Diffstat (limited to 'play.js')
-rw-r--r--play.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/play.js b/play.js
index 4410ab9..5715d70 100644
--- a/play.js
+++ b/play.js
@@ -10,10 +10,13 @@ const class_name = [ "armor", "infantry", "anti-tank", "artillery" ]
// refit and queue hexes
const MALTA = 4
-const hex_special = [ 48, 49, 102, 127, MALTA ]
+const hex_special = [ 47, 48, 49, 102, 127, MALTA ]
const unit_count = 94
+const EXIT_HEXES = [ 99, 148, 197 ] // [ 99, 123, 148 ] //, 172, 197 ]
+const REFIT_HEXES = [ 48, 102 ]
+
const SS_NONE = 0
const SS_BASE = 1
const SS_BARDIA = 2
@@ -496,6 +499,10 @@ function build_hexes() {
hex.addEventListener("mouseenter", on_focus_hex)
hex.addEventListener("mouseleave", on_blur)
hex.hex = hex_id
+ if (EXIT_HEXES.includes(hex_id))
+ hex.classList.add("exit")
+ if (REFIT_HEXES.includes(hex_id))
+ hex.classList.add("refit")
document.getElementById("mapsvg").getElementById("hexes").appendChild(hex)
}