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.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;

Loading…
Cancel
Save