Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Jul 28, 2024
1 parent 5a7e9d1 commit 0cb8cba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/variety/icewalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@
} else if (this.mouseend && this.notInputted()) {
this.prevPos.reset();
this.inputpeke();
if (this.pid === "firewalk" && this.notInputted()) {
this.prevPos.reset();
this.inputdot();
if (this.notInputted()) {
this.toggleArcs();
}
}
}
} else if (
this.btn === "right" &&
(this.mousestart || this.mousemove)
) {
this.inputpeke();
}
if (this.pid === "firewalk" && this.mouseend && this.notInputted()) {
this.prevPos.reset();
this.inputdot();
if (this.notInputted()) {
this.toggleArcs();
}
}
} else if (this.puzzle.editmode) {
var cell = this.getcell();
if (
Expand Down
5 changes: 5 additions & 0 deletions test/script/firewalk.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ ui.debug.addDebugData("firewalk", {
input: ["mouse,left,1,3,5,3"],
result:
"pzprv3/firewalk/3/3/. . . /. # . /. . . /0 0 1 0 /0 0 0 0 /0 1 0 0 /0 0 0 /0 1 0 /0 1 0 /0 0 0 /"
},
{
input: ["mouse,left,2,2", "mouse,right,4,2"],
result:
"pzprv3/firewalk/3/3/. . . /. # . /. . . /0 0 1 0 /0 0 0 0 /0 1 0 0 /0 0 0 /0 1 0 /0 1 0 /0 0 0 /0 0 0 0 /0 1 2 0 /0 0 0 0 /0 0 0 0 /"
}
]
});

0 comments on commit 0cb8cba

Please sign in to comment.