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/game')
-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) |