|
|
@ -1277,19 +1277,16 @@ class Game { |
|
|
|
this.board.removeOrbByIndex(n); |
|
|
|
this.board.removeOrbByIndex(n); |
|
|
|
this.selectedOrb = null; |
|
|
|
this.selectedOrb = null; |
|
|
|
wantRefresh = true; |
|
|
|
wantRefresh = true; |
|
|
|
} |
|
|
|
} else if (this.selectedOrb === null) { |
|
|
|
else if (this.selectedOrb === null) { |
|
|
|
|
|
|
|
// first selection
|
|
|
|
// first selection
|
|
|
|
this.selectedOrb = {n, orb}; |
|
|
|
this.selectedOrb = {n, orb}; |
|
|
|
orb.node.classList.add('selected'); |
|
|
|
orb.node.classList.add('selected'); |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
if (this.selectedOrb.n === n) { |
|
|
|
if (this.selectedOrb.n === n) { |
|
|
|
// orb clicked twice
|
|
|
|
// orb clicked twice
|
|
|
|
orb.node.classList.remove('selected'); |
|
|
|
orb.node.classList.remove('selected'); |
|
|
|
this.selectedOrb = null; |
|
|
|
this.selectedOrb = null; |
|
|
|
} |
|
|
|
} else { |
|
|
|
else { |
|
|
|
|
|
|
|
// second orb in a pair
|
|
|
|
// second orb in a pair
|
|
|
|
const otherSymbol = this.selectedOrb.orb.symbol; |
|
|
|
const otherSymbol = this.selectedOrb.orb.symbol; |
|
|
|
|
|
|
|
|
|
|
|