diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-08-01 20:50:11 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-17 13:11:26 +0100 |
commit | 2d6ca25d35f83bccaa9c06cdc21d6929a6ffa4b9 (patch) | |
tree | f1d02b25f83152001f2c1fd2ee88f6cf12190195 /play.js | |
parent | 7dfe644474ea0fd3b4b7f463b237406028c495ba (diff) | |
download | rommel-in-the-desert-2d6ca25d35f83bccaa9c06cdc21d6929a6ffa4b9.tar.gz |
Misc.
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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) { |