index : btroops | |
Virtual board game-aid for BattleTroops, an infantry combat simulator wargame published by FASA in 1989. |
aboutsummaryrefslogtreecommitdiff |
diff options
author | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-23 15:05:58 -0700 |
---|---|---|
committer | Catalin Mititiuc <webdevcat@proton.me> | 2024-07-23 15:05:58 -0700 |
commit | 5fc598cdd15be3d8dd856997af2b1f68f774162c (patch) | |
tree | ad964b16b065e859a5c71e7ff294c86f14ad77e4 /src/modules/game/soldier.js | |
parent | 9d44de5f114cacd915661ef5b2af3e5098fee3b8 (diff) |
WIP: counters
Diffstat (limited to 'src/modules/game/soldier.js')
-rw-r--r-- | src/modules/game/soldier.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js index 3ac7b37..a024f9f 100644 --- a/src/modules/game/soldier.js +++ b/src/modules/game/soldier.js @@ -108,6 +108,18 @@ export function getTrace(svg, counter) { } export function place(svg, selected, cell) { + //console.log(selected.parentElement); + //const piecesContainer = svg.querySelector('.pieces'); + //const parent = selected.parentElement; + //if (parent) + // parent.setAttributeNS(null, 'transform', cell.getAttributeNS(null, 'transform')); + //else { + // const container = document.createElementNS(svgns, 'g'); + // container.setAttributeNS(null, 'transform', cell.getAttributeNS(null, 'transform')); + // container.append(selected); + // piecesContainer.append(container); + //} + if (svg.querySelector('.grid').contains(selected)) { const clone = addMoveToHistory(selected); updatePlacement(cell, selected, clone) |