summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index 8efe01b..f6f40ce 100644
--- a/rules.js
+++ b/rules.js
@@ -1228,9 +1228,6 @@ function trace_supply_network_1(start)
let here = item >> 3
let here_move = item & 7
- if (supply_friendly[here] > 0)
- search_order.unshift(here)
-
for (let s = 0; s < 6; ++s) {
let next = here + hexnext[s]
@@ -1258,6 +1255,9 @@ function trace_supply_network_1(start)
supply_visited[next] = next_move
+ if (supply_friendly[next] > 0 && !supply_net[next])
+ search_order.unshift(next)
+
supply_net[next] = 1
if (next_move !== TRACE_STOP)