summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-07-28 17:23:28 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:26 +0100
commit1f3e8f7fcc6c283bfe31240475cdff3d5fc6b7fd (patch)
tree23028efc1851b475fe7ad9d60114ebfd7442fbb5 /play.js
parent55f61eaa5218a52dfae104eeb7b732f4b10718fc (diff)
downloadrommel-in-the-desert-1f3e8f7fcc6c283bfe31240475cdff3d5fc6b7fd.tar.gz
Refit & queue locations.
Diffstat (limited to 'play.js')
-rw-r--r--play.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/play.js b/play.js
index 663d903..78e1b3a 100644
--- a/play.js
+++ b/play.js
@@ -10,6 +10,9 @@ const sqrt = Math.sqrt
const class_name = [ "armor", "infantry", "anti-tank", "artillery" ]
+// refit and queue hexes
+const hex_special = [ 48, 49, 102, 127 ]
+
const ARMOR = 0
const INFANTRY = 1
const ANTITANK = 2
@@ -425,7 +428,7 @@ function build_hexes() {
ui.hex_y[hex_id] = round(hex_y)
// Add hex cell
- if (hex_exists[hex_id])
+ if (hex_exists[hex_id] || hex_special.includes(hex_id))
{
let hex = ui.hexes[hex_id] = document.createElementNS(svgNS, "polygon")
hex.setAttribute("class", "hex")