Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/game/soldier.js')
-rw-r--r--src/modules/game/soldier.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js
index 922faca..b01ed15 100644
--- a/src/modules/game/soldier.js
+++ b/src/modules/game/soldier.js
@@ -29,6 +29,10 @@ function getCounterAndClones(svg, counter) {
return svg.querySelectorAll(`.counter${dataSelector(counter)}`);
}
+export function getAllCounters(container) {
+ return container.querySelectorAll('g.counter[data-allegiance][data-number]');
+}
+
export function getCounter(svg, selected) {
return svg.querySelector(`.counter${dataSelector(selected)}:not(.clone)`);
}