From 441c2ff4658312371f70a4ddc768ac13834d4be8 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 11 Mar 2024 03:22:53 +0100 Subject: Also put hexes where supply lines stop in the search order list. --- rules.js | 6 +++--- 1 file 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) -- cgit v1.2.3