Skip to content

Commit

Permalink
kurochute, nothree: Add pekes
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Feb 23, 2025
1 parent c152e8b commit 1bab081
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/variety/kurochute.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use: true,
inputModes: {
edit: ["number", "clear"],
play: ["shade", "unshade", "completion"]
play: ["shade", "unshade", "peke", "completion"]
},
mouseinput_auto: function() {
if (this.puzzle.playmode) {
Expand Down Expand Up @@ -75,6 +75,7 @@
}
},
Board: {
hasborder: 1,
cols: 8,
rows: 8
},
Expand All @@ -99,6 +100,8 @@

this.drawChassis();

this.drawPekes();

this.drawTarget();
},

Expand Down Expand Up @@ -134,10 +137,12 @@
decodeData: function() {
this.decodeCellQnum();
this.decodeCellQanssubcmp();
this.decodeBorderLine();
},
encodeData: function() {
this.encodeCellQnum();
this.encodeCellQanssubcmp();
this.encodeBorderLineIfPresent();
},

decodeCellQanssubcmp: function() {
Expand Down
19 changes: 18 additions & 1 deletion src/variety/nothree.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use: true,
inputModes: {
edit: ["circle-unshade", "info-blk"],
play: ["shade", "unshade", "info-blk"]
play: ["shade", "unshade", "peke", "info-blk"]
},
inputFixedNumber: function() {
this.inputdot();
Expand Down Expand Up @@ -92,6 +92,19 @@

dotCells: function() {
return new this.klass.CellList(this.sidecell);
},

prehook: {
qsub: function(num) {
return num && this.qnum;
}
},
posthook: {
qnum: function(num) {
if (num) {
this.setQsub(0);
}
}
}
},
Board: {
Expand Down Expand Up @@ -129,6 +142,8 @@

this.drawChassis();

this.drawPekes();

this.drawCursor(false, this.puzzle.editmode);
},

Expand All @@ -152,10 +167,12 @@
decodeData: function() {
this.decodeDotFile();
this.decodeCellAns();
this.decodeBorderLine();
},
encodeData: function() {
this.encodeDotFile();
this.encodeCellAns();
this.encodeBorderLineIfPresent();
}
},

Expand Down

0 comments on commit 1bab081

Please sign in to comment.