summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-08-01 20:50:11 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-17 13:11:26 +0100
commit2d6ca25d35f83bccaa9c06cdc21d6929a6ffa4b9 (patch)
treef1d02b25f83152001f2c1fd2ee88f6cf12190195 /play.js
parent7dfe644474ea0fd3b4b7f463b237406028c495ba (diff)
downloadrommel-in-the-desert-2d6ca25d35f83bccaa9c06cdc21d6929a6ffa4b9.tar.gz
Misc.
Diffstat (limited to 'play.js')
-rw-r--r--play.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/play.js b/play.js
index 2590254..d9f402a 100644
--- a/play.js
+++ b/play.js
@@ -230,8 +230,8 @@ function is_side_allied_supply_line(side) {
return view.allied_supply_line[side] > 0
}
-function is_hex_battle(hex) {
- return set_has(view.battles, hex) && !set_has(view.assaults)
+function is_hex_selected(hex) {
+ return set_has(view.selected_hexes, hex)
}
function is_hex_assault(hex) {
@@ -710,9 +710,7 @@ function update_map() {
ui.hexes[hex].classList.toggle("forced_march", is_hex_forced_march_action(hex))
ui.hexes[hex].classList.toggle("from", hex === view.from1 || hex === view.from2)
ui.hexes[hex].classList.toggle("to", hex === view.to1 || hex === view.to2)
- ui.hexes[hex].classList.toggle("battle", is_hex_battle(hex))
- ui.hexes[hex].classList.toggle("assault", is_hex_assault(hex))
- ui.hexes[hex].classList.toggle("current", is_hex_current(hex))
+ ui.hexes[hex].classList.toggle("selected", is_hex_selected(hex))
ui.hexes[hex].classList.toggle("axis_control", is_hex_axis_controlled(hex))
ui.hexes[hex].classList.toggle("allied_control", is_hex_allied_controlled(hex))
for (let s = 0; s < 3; ++s) {