From abc8b02a9c73e68f435d8971b2ef0e1970f42212 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Tue, 28 May 2024 15:42:04 -0700
Subject: WIP: select counter test
---
src/modules/gameboard.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
(limited to 'src/modules/gameboard.js')
diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js
index a354795..38a9a9a 100644
--- a/src/modules/gameboard.js
+++ b/src/modules/gameboard.js
@@ -200,7 +200,8 @@ function endMove() {
export function start(el) {
svg = el;
- getUnits(svg).forEach(unit => unit.addEventListener('click', selectOffBoard));
+ const startingLocations = svg.querySelector('.start-locations');
+ startingLocations && getUnits(startingLocations).forEach(unit => unit.addEventListener('click', selectOffBoard));
getCells(svg).forEach(cell => {
cell.addEventListener('click', e => {
--
cgit v1.2.3