Web Dev Solutions

Catalin Mititiuc

From 5f17d5d786af74bb7b6bd6f99bcd0ccfab4fc9d5 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Tue, 2 Jul 2024 17:18:45 -0700 Subject: Add troop number and squad number when creating counters --- src/index.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'src/index.js') diff --git a/src/index.js b/src/index.js index f1bc918..24e017d 100644 --- a/src/index.js +++ b/src/index.js @@ -66,7 +66,26 @@ async function buildScenario(req) { panzoom.start(svg); gameboard.start(svg); - recordSheet.start(svg.querySelector('.start-locations'), gameboard.getUnits()); + // recordSheet.start(svg.querySelector('.start-locations'), gameboard.getUnits()); + const units = [ + { dataset: { allegiance: 'attacker', number: 1, squad: 1, weapon: 'blazer' }}, + { dataset: { allegiance: 'attacker', number: 2, squad: 1, weapon: 'rifle' }}, + { dataset: { allegiance: 'attacker', number: 3, squad: 1, weapon: 'rifle' }}, + { dataset: { allegiance: 'attacker', number: 4, squad: 1, weapon: 'smg' }}, + { dataset: { allegiance: 'attacker', number: 5, squad: 1, weapon: 'smg' }}, + { dataset: { allegiance: 'attacker', number: 6, squad: 1, weapon: 'smg' }}, + { dataset: { allegiance: 'attacker', number: 7, squad: 1, weapon: 'smg' }}, + + { dataset: { allegiance: 'defender', number: 1, squad: 1, weapon: 'blazer' }}, + { dataset: { allegiance: 'defender', number: 2, squad: 1, weapon: 'rifle' }}, + { dataset: { allegiance: 'defender', number: 3, squad: 1, weapon: 'rifle' }}, + { dataset: { allegiance: 'defender', number: 4, squad: 1, weapon: 'smg' }}, + { dataset: { allegiance: 'defender', number: 5, squad: 1, weapon: 'smg' }}, + { dataset: { allegiance: 'defender', number: 6, squad: 1, weapon: 'smg' }}, + { dataset: { allegiance: 'defender', number: 7, squad: 1, weapon: 'smg' }}, + ] + + recordSheet.start(null, units); } function updateTurnCounter() { -- cgit v1.2.3