index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/modules/recordSheet.js')
-rw-r--r-- | src/modules/recordSheet.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/modules/recordSheet.js b/src/modules/recordSheet.js deleted file mode 100644 index 99af18f..0000000 --- a/src/modules/recordSheet.js +++ /dev/null @@ -1,32 +0,0 @@ -export function unSelect() { - const selected = getSelected(); - - if (selected) { - selected.classList.remove('selected'); - } - - document.getElementById('toggle-prone-counter').checked = false; -} - -export function getSelected() { - return document.querySelector('.soldier-record.selected'); -} - -export function select(data) { - const selector = - `#record-sheet .soldier-record[data-number="${data.number}"][data-allegiance="${data.allegiance}"]` - - unSelect(); - document.querySelector(selector).classList.add('selected'); - document.getElementById('toggle-prone-counter').checked = data.prone; -} - -export function endMove() { - const selected = getSelected(); - - if (selected) { - selected.classList.toggle('movement-ended'); - } - - unSelect(); -} |