diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-07-31 00:37:17 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:26 +0100 |
commit | 3dec7b3400c1e75027881a65620c5c908365a36c (patch) | |
tree | 6eeb1d12dbaf6996cb2ad06e6153ec16582359e8 /play.js | |
parent | d109a4fa1d646c7f1066d86e5f1ca01ce9bc00cc (diff) | |
download | rommel-in-the-desert-3dec7b3400c1e75027881a65620c5c908365a36c.tar.gz |
Color tables to match.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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) } |