From 2d6ca25d35f83bccaa9c06cdc21d6929a6ffa4b9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 1 Aug 2022 20:50:11 +0200 Subject: Misc. --- play.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'play.js') 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) { -- cgit v1.2.3