diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-09-23 23:02:15 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-10-01 16:11:22 +0200 |
commit | 1c45f29cd419c14acf13e7823866a14e60641905 (patch) | |
tree | cf21ec900c90b64adb9bcef411333c61369e41b8 /play.js | |
parent | 419f978d09f713e852ab165b5b5c128c3d433257 (diff) | |
download | waterloo-campaign-1815-1c45f29cd419c14acf13e7823866a14e60641905.tar.gz |
Logging.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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") } } |