Skip to content

Commit

Permalink
Experiment with click to toggle arcs
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Jul 7, 2024
1 parent c39b67e commit bae635c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/variety/icewalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
} else if (this.mouseend && this.notInputted()) {
this.prevPos.reset();
this.inputpeke();
if (this.pid === "firewalk" && this.notInputted()) {
this.toggleArcs();
}
}
} else if (
this.btn === "right" &&
Expand Down Expand Up @@ -51,6 +54,14 @@
}
},
"MouseEvent@firewalk": {
toggleArcs: function() {
var cell = this.getcell();
if (cell.isnull || !cell.ice() || cell.lcnt < 3) {
return;
}
cell.setQans(cell.qans !== 1 ? 1 : 2);
cell.drawAround();
},
inputLine: function() {
var cell = this.getcell();
this.initFirstCell(cell);
Expand Down

0 comments on commit bae635c

Please sign in to comment.