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/index.js')
-rw-r--r-- | src/index.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js index 89893b6..b4216be 100644 --- a/src/index.js +++ b/src/index.js @@ -121,7 +121,8 @@ window.addEventListener('load', () => { game.unSelect(); RecordSheet.unSelect(); } else { - game.select(el.dataset.troopAllegiance, el.dataset.troopNumber); + const { troopAllegiance: allegiance, troopNumber: number } = el.dataset; + game.select({ dataset: { allegiance, number }}); } }) ); @@ -156,7 +157,8 @@ window.addEventListener('load', () => { .forEach(el => el.classList.remove('movement-ended')); game.endTurn(allegiance); - game.select(records.at(0).dataset.troopAllegiance, records.at(0).dataset.troopNumber); + const { troopAllegiance, troopNumber } = records.at(0).dataset; + game.select({ dataset: { allegiance: troopAllegiance, number: troopNumber }}); }) ); |