summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-24 19:40:35 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-01 16:11:22 +0200
commit192b949ff8503e1f80ccd873ebc77fbfbe60d158 (patch)
tree8ea514a36d391ae729736a192b0ce96ba6775cd9
parent468f7e0dba1a676a72a8655e58eefbd2855b466b (diff)
downloadwaterloo-campaign-1815-192b949ff8503e1f80ccd873ebc77fbfbe60d158.tar.gz
Don't show path for placing detachments.
There are several overlapping search networks, would need multiple move_from sets for proper visualization.
-rw-r--r--rules.js8
1 files changed, 0 insertions, 8 deletions
diff --git a/rules.js b/rules.js
index 86198ae..1b8dcc1 100644
--- a/rules.js
+++ b/rules.js
@@ -849,9 +849,6 @@ states.place_detachment_where = {
search_detachment(game.who, game.target)
- view.move_from = move_from
- view.move_from_road = move_from_road
-
for (let row = 0; row < data.map.rows; ++row) {
for (let col = 0; col < data.map.cols; ++col) {
let x = 1000 + row * 100 + col
@@ -1406,9 +1403,6 @@ function can_trace_detachment(here, next) {
function search_detachment(who, hq) {
move_seen.fill(0)
- move_from.length = 0
- move_from_road.length = 0
-
search_detachment_normal(piece_hex(hq), piece_command_range(hq))
if (!piece_mode(hq))
@@ -1432,7 +1426,6 @@ function search_detachment_normal(start, ma) {
for_each_adjacent(here, next => {
if (!move_cost[next-1000]) {
if (can_trace_detachment(here, next)) {
- map_set(move_from, next, here)
move_cost[next-1000] = 1
move_seen[next-1000] = 1
if (mp > 1)
@@ -1477,7 +1470,6 @@ function search_detachment_road_segment(queue, here, road, cur, dir) {
let seen_mp = move_cost[next-1000]
if (seen_mp === 255 || next_mp > seen_mp) {
- map_set(move_from_road, next, here)
move_seen[next-1000] = 1
move_cost[next-1000] = next_mp
qq = (next_mp > 0)