Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-05-15 18:08:24 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-05-15 18:08:24 -0700
commit021b8d3a9a25b751180781b000696841da83e0b1 (patch)
treeb67f6b727ed90a2fe3e7030195bbf720d7ba7e7b /src/modules
parentbd31e3e4a64775d3e2ea2efeb5b2122e384b30e3 (diff)
Apply styles and map script to manually loaded files
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/gameboard.js2
-rw-r--r--src/modules/record_sheet.js12
2 files changed, 8 insertions, 6 deletions
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();