Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/game')
-rw-r--r--src/modules/game/firing_arc.js4
-rw-r--r--src/modules/game/soldier.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/game/firing_arc.js b/src/modules/game/firing_arc.js
index 817bc44..cea8bd0 100644
--- a/src/modules/game/firing_arc.js
+++ b/src/modules/game/firing_arc.js
@@ -13,8 +13,8 @@ const horzToVertDistRatio = 2 * Math.sqrt(3) / 3,
},
firingArcVisibility = {
- davion: false,
- liao: false
+ defender: false,
+ attacker: false
},
clippedFiringArcRadius = 25;
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)`);
}