Skip to content

Commit

Permalink
Remove startsOnNumber logic
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Aug 11, 2023
1 parent 93a1eb1 commit 1628839
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/variety/patchwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@
},
mouseinput_auto: function() {
if (this.puzzle.playmode) {
if (this.mousestart) {
this.startsOnNumber = this.getcell().isNum();
}

if (this.mousestart || this.mousemove) {
if (this.btn === "right" || this.startsOnNumber) {
if (this.btn === "right") {
this.inputQsubLine();
} else if (this.isBorderMode()) {
this.inputborder();
Expand Down
10 changes: 5 additions & 5 deletions test/script/patchwork.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ ui.debug.addDebugData("patchwork", {
result: "pzprv3/patchwork/2/3/. 5 . /. . . /0 0 /0 0 /0 0 0 /"
},
{
input: ["playmode", "mouse,left,1,1,1,3", "mouse,left,3,1,3,3"],
result: "pzprv3/patchwork/2/3/# 5 . /# . . /0 0 /0 0 /0 -1 0 /"
input: ["playmode", "mouse,left,1,1,1,3"],
result: "pzprv3/patchwork/2/3/# 5 . /# . . /0 0 /0 0 /0 0 0 /"
},
{
input: ["mouse,left,1.9,0,2.1,4", "mouse,right,5,2,5,1,5,3"],
result: "pzprv3/patchwork/2/3/# 5 . /# . . /1 0 /1 0 /0 -1 -1 /"
result: "pzprv3/patchwork/2/3/# 5 . /# . . /1 0 /1 0 /0 0 -1 /"
},
{
input: ["mouse,leftx2,3,3", "mouse,left,4,3"],
result: "pzprv3/patchwork/2/3/# 5 . /# + . /1 0 /1 -1 /0 -1 -1 /"
result: "pzprv3/patchwork/2/3/# 5 . /# + . /1 0 /1 -1 /0 0 -1 /"
},
{
input: ["mouse,right,5,1", "mouse,left,5,2"],
result: "pzprv3/patchwork/2/3/# 5 + /# + . /1 0 /1 -1 /0 -1 0 /"
result: "pzprv3/patchwork/2/3/# 5 + /# + . /1 0 /1 -1 /0 0 0 /"
}
]
});

0 comments on commit 1628839

Please sign in to comment.