Web Dev Solutions

Catalin Mititiuc

From 021b8d3a9a25b751180781b000696841da83e0b1 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Wed, 15 May 2024 18:08:24 -0700 Subject: Apply styles and map script to manually loaded files --- src/modules/gameboard.js | 2 ++ src/modules/record_sheet.js | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/modules') diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js index e20949a..abf37b0 100644 --- a/src/modules/gameboard.js +++ b/src/modules/gameboard.js @@ -270,6 +270,8 @@ export function start(el) { } }); }); + + console.log('gameboard.js loaded'); } export function select(selected) { diff --git a/src/modules/record_sheet.js b/src/modules/record_sheet.js index 78dbace..4abccc6 100644 --- a/src/modules/record_sheet.js +++ b/src/modules/record_sheet.js @@ -83,12 +83,6 @@ function createRecords(units) { return grouped; } -function clear() { - document.querySelectorAll('#attacker-record > div, #defender-record > div').forEach(el => el.remove()); - document.querySelector('#attacker-record .name').textContent = 'attacker'; - document.querySelector('#defender-record .name').textContent = 'defender'; -} - function addEventListeners(unSelectCounter, selectCounter) { document.querySelectorAll('.soldier-record').forEach(el => el.addEventListener('click', () => { @@ -103,6 +97,12 @@ function addEventListeners(unSelectCounter, selectCounter) { ); } +export function clear() { + document.querySelectorAll('#attacker-record > div, #defender-record > div').forEach(el => el.remove()); + document.querySelector('#attacker-record .name').textContent = 'attacker'; + document.querySelector('#defender-record .name').textContent = 'defender'; +} + export function unSelect() { const selected = getSelected(); -- cgit v1.2.3