Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/game.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/game.js b/src/modules/game.js
index 2633320..485362b 100644
--- a/src/modules/game.js
+++ b/src/modules/game.js
@@ -12,10 +12,6 @@ function getGridIndex({ parentElement: { dataset: { x }, parentElement: { datase
return { x: +x, y: +y };
}
-function getCounterAtGridIndex(x, y) {
- return getCell(x, y).querySelector('.counter');
-}
-
function getHex(cell) {
return cell.querySelector('use[href="#hex"]');
}
@@ -235,6 +231,10 @@ export default function (svg) {
return svg.querySelector(`g[data-y="${y}"] > g[data-x="${x}"]`);
}
+ function getCounterAtGridIndex(x, y) {
+ return getCell(x, y).querySelector('.counter');
+ }
+
function getSelected() {
return svg.querySelector(`.counter.selected[data-allegiance][data-number]`);
}