diff options
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) } |