From 468f7e0dba1a676a72a8655e58eefbd2855b466b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 24 Sep 2023 19:32:18 +0200 Subject: Fix detachment road search (bad initial cost value). --- rules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rules.js') 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 -- cgit v1.2.3