Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/gameboard.js')
-rw-r--r--src/modules/gameboard.js17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/modules/gameboard.js b/src/modules/gameboard.js
index 5851273..44146f2 100644
--- a/src/modules/gameboard.js
+++ b/src/modules/gameboard.js
@@ -79,7 +79,6 @@ function getSelected() {
function deselect() {
const selected = getSelected();
placing = [];
- Observable.notify('proneflag', false);
if (selected) {
selected.classList.remove(soldier.getSelectedClass());
@@ -194,7 +193,6 @@ function select(data) {
counter.classList.add(soldier.getSelectedClass());
firingArc.get(svg, counter).forEach(el => el.removeAttribute('clip-path'));
- Observable.notify('proneflag', soldier.hasProne(counter));
placing.push(counter);
}
@@ -266,7 +264,6 @@ export function start(el) {
}
const selected = getSelected();
- //Observable.notify('proneflag', selected && soldier.hasProne(selected));
}
getCells(svg).forEach(cell => {
@@ -317,7 +314,6 @@ export function start(el) {
}
const selected = getSelected();
- Observable.notify('proneflag', selected && soldier.hasProne(selected));
});
cell.addEventListener('dblclick', e => {
@@ -406,14 +402,14 @@ export function start(el) {
// debug //
// Add a trooper counter
- //const attacker = { dataset: { allegiance: 'attacker', number: 1, squad: 1 }};
+ const attacker = { dataset: { allegiance: 'attacker', number: 1, squad: 1 }};
// const defender = { dataset: { allegiance: 'defender', number: 1, squad: 2 }};
- //const cell = getCell(0, 0, 0, 0);
- //const trooper = soldier.createCounter(attacker, 'blazer');
+ const cell = getCell(0, 0, 0, 0);
+ const trooper = soldier.createCounter(attacker, 'blazer');
//const trooperSack = document.createElementNS(svgns, 'g');
//trooperSack.classList.add('cell-contents');
//trooperSack.append(trooper);
- //soldier.place(svg, trooper, cell);
+ soldier.place(svg, trooper, cell);
// Add some counters in an unoccupied cell
//const countersCell = getCell(-1, 1, 0, 0);
@@ -445,11 +441,6 @@ export function clearFiringArcs(allegiance) {
firingArc.clear(svg, allegiance);
}
-export function toggleProne() {
- const selected = getSelected();
- if (selected) soldier.toggleProne(selected);
-}
-
export function toggleFiringArcVisibility() {
firingArc.toggleVisibility(svg, this.dataset.allegiance);
}