summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-24 19:32:18 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-01 16:11:22 +0200
commit468f7e0dba1a676a72a8655e58eefbd2855b466b (patch)
tree979ae3308b461e1e0ed0768712c4aa1117601210
parentef09c3cbecb96ed6007e2145a47cb24cc4ad5506 (diff)
downloadwaterloo-campaign-1815-468f7e0dba1a676a72a8655e58eefbd2855b466b.tar.gz
Fix detachment road search (bad initial cost value).
-rw-r--r--rules.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/rules.js b/rules.js
index e011bd6..86198ae 100644
--- a/rules.js
+++ b/rules.js
@@ -1446,7 +1446,7 @@ function search_detachment_normal(start, ma) {
function search_detachment_road(start, range) {
let queue = [ start ]
- move_cost.fill(0)
+ move_cost.fill(255)
move_cost[start-1000] = range
move_seen[start-1000] = 1