From 1c45f29cd419c14acf13e7823866a14e60641905 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 23 Sep 2023 23:02:15 +0200 Subject: Logging. --- play.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'play.js') diff --git a/play.js b/play.js index 04af556..182454f 100644 --- a/play.js +++ b/play.js @@ -186,26 +186,26 @@ function show_move_path(x) { if (!is_action("hex", x) && !is_action("stop_hex", x)) return - if (view.move_from_road && map_get(view.move_from_road, x, 0)) { + if (view.move_from && map_get(view.move_from, x, 0)) { _move_path = [] for (let i = 0; x && i < 100; ++i) { _move_path.push(x) - x = map_get(view.move_from_road, x, 0) + x = map_get(view.move_from, x, 0) } for (let x of _move_path) - ui.hexes[x].classList.add("road") + ui.hexes[x].classList.add("move") } else - if (view.move_from && map_get(view.move_from, x, 0)) { + if (view.move_from_road && map_get(view.move_from_road, x, 0)) { _move_path = [] for (let i = 0; x && i < 100; ++i) { _move_path.push(x) - x = map_get(view.move_from, x, 0) + x = map_get(view.move_from_road, x, 0) } for (let x of _move_path) - ui.hexes[x].classList.add("move") + ui.hexes[x].classList.add("road") } } -- cgit v1.2.3