index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-30 17:31:38 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-04-30 17:31:38 -0700 |
commit | 9304d937fc4dd793dbfba13be30b0073d1f76597 (patch) | |
tree | 6b1436f7db775ad2e19ffbcc832428c973781c98 | |
parent | d393934679290ab4e16aa0b4a73408273eb26596 (diff) |
Fix cancel firing arc placement bug
-rw-r--r-- | src/modules/game/firing_arc.js | 2 | ||||
-rw-r--r-- | src/modules/gameboard.js | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/game/firing_arc.js b/src/modules/game/firing_arc.js index cea8bd0..7a82c43 100644 --- a/src/modules/game/firing_arc.js +++ b/src/modules/game/firing_arc.js @@ -294,7 +294,7 @@ function set(svg, size, counter, { x, y }) { function cancelPlacementListener(e) { e.preventDefault(); - get(counter).forEach(el => el.remove()); + get(svg, counter).forEach(el => el.remove()); grid.removeAttribute('style'); svg.removeEventListener('mousemove', positionListener); } diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index b7ef148..d4592fc 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -222,7 +222,7 @@ export function start(el) { const toPlace = placing.pop(), occupant = getCellOccupant(cell); - if (toPlace && occupant && toPlace == occupant) { + if (toPlace && occupant && toPlace === occupant) { const { number, allegiance } = toPlace.dataset, selector = `[data-allegiance="${allegiance}"][data-number="${number}"]`; |