Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 46f39fd..d2c1b01 100644
--- a/src/index.js
+++ b/src/index.js
@@ -158,7 +158,10 @@ document.querySelectorAll('.set-firing-arc').forEach(el =>
el.addEventListener('click', gameboard.setFiringArc)
);
-document.querySelector('.set-grenade').addEventListener('click', gameboard.setGrenade);
+document.querySelectorAll('.counters-list button').forEach(el => {
+ el.addEventListener('click', e => gameboard.setCounter(el.className));
+});
+
document.querySelector('.set-mech-template').addEventListener('click', gameboard.setMechTemplate);
document.querySelectorAll('#toggle-firing-arc-vis input').forEach(el =>