master
Ondřej Hruška 5 years ago
parent 6f10b87577
commit c4e86ef1a4
Signed by: MightyPork
GPG Key ID: 2C5FD5035250423D
  1. 9
      script.js

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

Loading…
Cancel
Save