summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.js8
-rw-r--r--play.js3
-rw-r--r--tools/gendata.js85
3 files changed, 54 insertions, 42 deletions
diff --git a/data.js b/data.js
index 278fa73..e15ca8f 100644
--- a/data.js
+++ b/data.js
@@ -1,10 +1,10 @@
// DON'T EDIT - AUTOGENERATED
-const all_hexes = [7,8,9,10,30,31,32,33,34,35,36,37,38,39,40,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,147,148,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,203,204,205,213]
-const hex_exists = [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]
+const all_hexes = [7,8,9,10,30,31,32,33,34,35,36,37,38,39,40,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,148,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,203,204,205,213]
+const hex_exists = [0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0]
const hex_road = [0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,1,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,1,1,2,2,2,4,4,2,4,4,4,4,4,4,4,4,4,4,4,0,0,0,4,2,2,2,2,2,0,1,2,2,2,2,0,1,0,2,0,0,0,2,0,0,0,0,0,4,2,0,1,1,0,1,0,0,1,2,1,1,0,2,0,0,0,2,0,0,0,0,0,0,4,1,1,0,0,1,0,0,0,1,1,1,1,2,0,0,0,0,0,0,0,0,0,4,4,1,0,0,0,1,0,0,0,0,1,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,1,1,1,1,1,2,0,0,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0,2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,2,0,0,2,2,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,2,2,0,2,0,1,0,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,2,0,2,0,0,2,0,0,2,0,2,2,0,0,2,0,0,2,0,0,2,0,0,2,0,0,2,0,0,2,2,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
-const hex_name = {"4":"Malta","7":"El Garib","8":"Cyrene","9":"El Gubba","10":"Derna","30":"Tocra","31":"Barce","32":"Marawa","33":"Wadi Cuff","34":"Wadi Cuff E","35":"Gazala","36":"Acroma","37":"Tobruk","38":"Belhamed","39":"Gambut","40":"Bardia","47":"Exited","48":"Return for Refit","49":"Alexandria Queue","54":"Benghazi","55":"Er Regima","56":"Charruba","57":"Charruba E","58":"Mechili","59":"Rotonda Segnali","60":"Sidi Mufta","61":"Bir Harmat","62":"El Adem","63":"Sidi Rezegh","64":"Ft. Capuzzo","65":"Sollum","66":"Buq Buq","67":"Sidi Barrani","68":"Sidi Barrani E","69":"Mersa Matruh","70":"Fuka","71":"El Daba","72":"El Alamein","73":"El Hamam","74":"Alexandria","78":"Ghemines","79":"Skeleidima","80":"Msus","81":"Msus E","82":"Tengeder W","83":"Tengeder","84":"Tengeder E","85":"Bir Hacheim","86":"Retma","87":"Bir Gubi","88":"Gabr Saleh","89":"Sidi Omar","90":"Bir Habata","91":"Sofafi","92":"Sofafi E","93":"Bir el Kenayis","94":"Bir Khalda","95":"Bir Khalda E","96":"Alam Halfa W","97":"Alam Halfa","98":"Alam Halfa E","99":"Map Edge","102":"Return for Refit","103":"Beda Fomm","104":"Antelat","105":"Antelat E","106":"Ben Gania","107":"Ben Gania E","108":"Tengeder SE","109":"Bir Hacheim SW","110":"Bir Hacheim SE","111":"Retma SE","112":"Ft. Maddalena W","113":"Ft. Maddalena","114":"Ft. Maddalena E","115":"Bir Khamsa","116":"Bir el Qatrani","117":"Bir el Qatrani E","118":"Bir el Kenayis SE","119":"Bir Khalda SE","120":"El Himeimat W","121":"El Himeimat","122":"El Himeimat E","123":"El Himeimat E E","127":"El Agheila Queue","128":"Agedabia","129":"Jebel el Matar","130":"Haraga","131":"Haraga E","137":"Ft. Maddalena SW","138":"Ft. Maddalena SE","139":"Bir Khamsa SW","140":"Bir Fuad W","141":"Bir Fuad","142":"Bir Fuad E","147":"El Himeimat E SE","148":"Map Edge","151":"El Agheila","152":"Mersa Brega","153":"El Haseiat","154":"El Haseiat E","155":"Haraga SE","162":"Jarabub Oasis NW","163":"Jarabub Oasis NE","165":"Bir Fuad SW","166":"Bir Fuad SE","176":"Maaten Giofer","177":"Maaten Giofer E","178":"Sahaba","179":"Sahaba E","180":"Jalo Oasis NE","186":"Jarabub Oasis W","187":"Jarabub Oasis","188":"Jarabub Oasis E","189":"Siwa Oasis NE","197":"Map Edge","203":"Jalo Oasis W","204":"Jalo Oasis","205":"Jalo Oasis E","213":"Siwa Oasis"}
+const side_limit = [0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,2,2,0,2,0,0,2,0,0,2,0,2,2,0,0,2,0,0,2,0,0,2,0,0,2,0,0,2,0,0,2,2,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
+const hex_name = {"4":"Malta","7":"El Garib","8":"Cyrene","9":"El Gubba","10":"Derna","30":"Tocra","31":"Barce","32":"Marawa","33":"Wadi Cuff","34":"Derna SW","35":"Gazala","36":"Acroma","37":"Tobruk","38":"Belhamed","39":"Gambut","40":"Bardia","47":"Exited","48":"Return for Refit","49":"Alexandria Queue","54":"Benghazi","55":"Er Regima","56":"Charruba","57":"Mechili W","58":"Mechili","59":"Rotonda Segnali","60":"Sidi Mufta","61":"Bir Harmat","62":"El Adem","63":"Sidi Rezegh","64":"Ft. Capuzzo","65":"Sollum","66":"Buq Buq","67":"Sidi Barrani","68":"Mersa Matruh W","69":"Mersa Matruh","70":"Fuka","71":"El Daba","72":"El Alamein","73":"El Hamam","74":"Alexandria","78":"Ghemines","79":"Skeleidima","80":"Msus","81":"Msus E","82":"Mechili SW","83":"Tengeder","84":"Tengeder E","85":"Bir Hacheim","86":"Retma","87":"Bir Gubi","88":"Gabr Saleh","89":"Sidi Omar","90":"Bir Habata","91":"Sofafi","92":"Bir el Kenayis W","93":"Bir el Kenayis","94":"Bir Khalda","95":"Fuka SE","96":"El Alamein SW","97":"Alam Halfa","98":"Alexandria SW","99":"Map Edge","102":"Return for Refit","103":"Beda Fomm","104":"Antelat","105":"Msus SE","106":"Ben Gania","107":"Tengeder SW","108":"Tengeder SE","109":"Bir Hacheim SW","110":"Bir Hacheim SE","111":"Bir Gubi SW","112":"Ft. Maddalena W","113":"Ft. Maddalena","114":"Ft. Maddalena E","115":"Bir Khamsa","116":"Bir el Qatrani","117":"Bir el Kenayis SW","118":"Bir el Kenayis SE","119":"Western Desert","120":"El Himeimat W","121":"El Himeimat","122":"El Himeimat E","123":"Alexandria SW SE","127":"El Agheila Queue","128":"Agedabia","129":"Jebel el Matar","130":"Haraga","131":"Haraga E","132":"Libya","133":"Jalo Oasis Trail","134":"Libya","135":"Libya","136":"Libya","137":"Ft. Maddalena SW","138":"Ft. Maddalena SE","139":"Bir Khamsa SW","140":"Bir Khamsa SE","141":"Bir Fuad","142":"Bir Fuad E","143":"Western Desert","144":"Western Desert","148":"Map Edge","151":"El Agheila","152":"Mersa Brega","153":"El Haseiat","154":"Haraga SW","155":"Haraga SE","156":"Libya","157":"Jalo Oasis Trail","158":"Libya","159":"Libya","160":"Libya","161":"Libya","162":"Jarabub Oasis NW","163":"Jarabub Oasis NE","164":"Siwa Oasis NE NW","165":"Bir Fuad SW","166":"Bir Fuad SE","167":"Western Desert","176":"Maaten Giofer","177":"Maaten Giofer E","178":"Sahaba","179":"Jalo Oasis NW","180":"Jalo Oasis NE","181":"Jalo Oasis Trail","182":"Libya Trail","183":"Libya Trail","184":"Libya Trail","185":"Libya Trail","186":"Jarabub Oasis W","187":"Jarabub Oasis","188":"Jarabub Oasis E","189":"Siwa Oasis NE","190":"Western Desert","191":"Western Desert","197":"Map Edge","203":"Jalo Oasis W","204":"Jalo Oasis","205":"Jalo Oasis E","213":"Siwa Oasis"}
const regions = {"Libya":[7,8,9,10,30,31,32,33,34,35,36,37,38,39,40,54,55,56,57,58,59,60,61,62,63,64,78,79,80,81,82,83,84,85,86,87,88,103,104,105,106,107,108,109,110,111,112,113,128,129,130,131,132,133,134,135,136,137,138,151,152,153,154,155,156,157,158,159,160,161,162,176,177,178,179,180,181,182,183,184,185,186,187,200,201,202,203,204,205,206,207,208,209,210,211],"Egypt":[65,66,67,68,69,70,71,72,73,74,89,90,91,92,93,94,95,96,97,98,114,115,116,117,118,119,120,121,122,123,139,140,141,142,143,144,163,164,165,166,167,188,189,190,191,212,213,214,215],"East Line":[36,37,38,39,40,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,85,86,87,88,89,90,91,92,93,94,95,96,97,98,112,113,114,115,116,117,118,119,120,121,122,123,137,138,139,140,141,142,143,144,162,163,164,165,166,167,187,188,189,190,191],"West Line":[7,8,9,10,30,31,32,33,34,35,54,55,56,57,58,59,78,79,80,81,82,83,103,104,105,106,107,128,129,130,151,152]}
const unit_name = ["Ari","Lit","Tri","Cen","Fas","Bre","Fol","Pav","Tre","Bol","Sav","Pis","Sab","Ita","15/33","21/3","90/580","15/8","21/5","15/115","21/104","90/155","90/346","90/sv288","90/200","90/361","164/382+433","Ram","164/125","88mm/A","88mm/B","50mm","76mm","/104","7","Sher/A","Sher/B","Grant","Matilda/A","Matilda/B","/1AT","1/2","1/22","7/7","10/8","/32AT","7/4","8/24","8/9","10/23","2/3","1/201G","7/22G","7/SG","1/SG","2/SG","44/131+133","51H/152","51H/154","70/14+16","70/23","44/132","6#/B","2#","6#/A","Priest","/B","/C","/D","/A","/Tob","4IN/7m","4IN/3m","10IN/161m","5IN/9+10","10IN/21+25","4IN/11","4IN/5","5IN/29","8IN/18","1SA","1SA/2+5","1SA/1","1SA/3","2SA/4+6","9AU/20","9AU/24","9AU/26","7AU/18","2NZ/4","2NZ/5","2NZ/6","FF/2","/Pol"]
const unit_appearance = ["S",11,7,19,17,"S","M","S","S","S","S",19,7,"S",3,"S",5,5,"S",3,"S",3,11,11,7,5,"M","M","M",3,11,5,17,7,4,18,20,12,"T",4,4,10,8,2,16,8,4,20,20,16,"S",10,"T","T",10,"S",16,18,18,"S","S",16,18,6,12,18,14,18,20,8,"T",2,"S",14,14,14,2,2,10,14,8,6,6,8,8,"S",16,16,"T",6,6,6,14,"T"]
diff --git a/play.js b/play.js
index 5b08e2a..e18b2f2 100644
--- a/play.js
+++ b/play.js
@@ -325,9 +325,6 @@ function for_each_side_in_path(path, fn) {
function on_focus_hex(evt) {
let h = evt.target.hex
let text = "(" + h + ") " + hex_name[h]
- for (let r in regions)
- if (regions[r].includes(h))
- text += " - " + r
document.getElementById("status").textContent = text
}
diff --git a/tools/gendata.js b/tools/gendata.js
index 1b0c85b..492e7f2 100644
--- a/tools/gendata.js
+++ b/tools/gendata.js
@@ -25,7 +25,7 @@ const map_h = 9;
let next = [ 1, map_w, map_w-1, -1, -map_w, -(map_w-1) ];
let nextdir = [ -1, 1, map_w, map_w-1, -map_w, -(map_w-1) ]
-let nextname = [ "E", "W", "NW", "NE", "SE", "SW" ];
+let nextname = [ "W", "E", "SE", "SW", "NW", "NE" ];
let hex_exists = new Array(map_w*map_h).fill(1);
let side_limit = new Array(map_w*map_h*3).fill(CLEAR);
@@ -252,7 +252,7 @@ def_offmap(214,221);
// Qattara Depression and east of it
// def_offmap(145,148);
-def_offmap(145,146);
+def_offmap(145,147);
def_offmap(168,172);
def_offmap(192,196);
def_offmap(216,221);
@@ -299,20 +299,6 @@ def_region("West Line", 103, 107);
def_region("West Line", 128, 130);
def_region("West Line", 151, 152);
-// def_region("Jebel el Akhdar", 7, 9);
-// def_region("Jebel el Akhdar", 32, 34);
-// def_region("Jebel el Akhdar", 56, 57);
-
-// def_region("Sebkha el Segira", 152, 152);
-// def_region("Sebkha el Segira", 176, 176);
-// def_region("Sebket el Jeneinen", 179, 179);
-// def_region("Sebket el Jeneinen", 203, 203);
-
-// def_region("Qattara Depression", 144, 146);
-// def_region("Qattara Depression", 168, 169);
-// def_region("Qattara Depression", 192, 193);
-// def_region("Qattara Depression", 216, 217);
-
hex_name = {
7: "El Garib",
8: "Cyrene",
@@ -389,10 +375,6 @@ hex_name = {
204: "Jalo Oasis",
213: "Siwa Oasis",
- // overrides
- 123: "El Himeimat E E",
- 147: "El Himeimat E SE",
-
99: "Map Edge",
148: "Map Edge",
197: "Map Edge",
@@ -402,26 +384,59 @@ hex_name = {
49: "Alexandria Queue",
102: "Return for Refit",
127: "El Agheila Queue",
+
+ 164: "Siwa Oasis NE NW",
+ 123: "Alexandria SW SE",
}
-function expand_names() {
- let hex_name2 = { }
- for (let hex_id = 0; hex_id < map_w * map_h; ++hex_id) {
- if (hex_exists[hex_id] && !hex_name[hex_id]) {
- for (let s = 0; s < 6; ++s) {
- let next_id = hex_id + nextdir[s];
- if (hex_name[next_id]) {
- hex_name2[hex_id] = hex_name[next_id] + " " + nextname[s];
- break;
- }
- }
- }
+function nameregion(name, region) {
+ for (let x of region)
+ if (!(x in hex_name) && hex_exists[x])
+ hex_name[x] = name
+}
+
+function namearound(name) {
+ let hex_id = 0
+ for (let x in hex_name)
+ if (hex_name[x] === name)
+ hex_id = x | 0
+ if (hex_id === 0)
+ throw new Error("place not found: " + name)
+ for (let s = 0; s < 6; ++s) {
+ let next_id = hex_id + nextdir[s];
+ if (hex_exists[next_id] && hex_name[next_id] === undefined)
+ hex_name[next_id] = name + " " + nextname[s]
}
- for (let hex_id in hex_name2)
- hex_name[hex_id] = hex_name2[hex_id];
}
-expand_names();
+namearound("Jalo Oasis")
+namearound("Jarabub Oasis")
+namearound("Siwa Oasis")
+
+namearound("Maaten Giofer")
+namearound("Mersa Matruh")
+namearound("Bir el Kenayis")
+namearound("Msus")
+namearound("Derna")
+namearound("Mechili")
+namearound("Tengeder")
+namearound("Haraga")
+namearound("Ft. Maddalena")
+namearound("Bir Hacheim")
+namearound("Bir Gubi")
+namearound("Alexandria")
+namearound("El Alamein")
+namearound("Fuka")
+namearound("El Himeimat")
+namearound("Bir Khamsa")
+namearound("Bir Fuad")
+
+nameregion("Western Desert", [119, 143, 144, 167, 190, 191 ])
+nameregion("Qattara Depression", [ 144, 145, 146, 147, 167, 168, 169, 191, 192, 193, 215, 216, 217 ])
+nameregion("Jalo Oasis Trail", [ 157, 133, 181 ])
+nameregion("Libya Trail", [ 182, 183, 184, 185 ])
+nameregion("Libya", regions.Libya)
+nameregion("Egypt", regions.Egypt)
let units = [];