Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/game/firing_arc.js2
-rw-r--r--src/modules/gameboard.js2
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}"]`;