From 3dec7b3400c1e75027881a65620c5c908365a36c Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 31 Jul 2022 00:37:17 +0200 Subject: Color tables to match. --- play.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'play.js') 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) } -- cgit v1.2.3