Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/game')
-rw-r--r--src/modules/game/soldier.js12
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)