summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-09-23 23:02:15 +0200
committerTor Andersson <tor@ccxvii.net>2023-10-01 16:11:22 +0200
commit1c45f29cd419c14acf13e7823866a14e60641905 (patch)
treecf21ec900c90b64adb9bcef411333c61369e41b8 /play.js
parent419f978d09f713e852ab165b5b5c128c3d433257 (diff)
downloadwaterloo-campaign-1815-1c45f29cd419c14acf13e7823866a14e60641905.tar.gz
Logging.
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 6 insertions, 6 deletions
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")
}
}