Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src-ui/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
<main>
<div style="margin-bottom: 5px;"><b>Latest types</b> (<em><a href="/list.html" target="_parent">all types</a></em>)</div>
<ul>
<li><a href="/p?hasunomura" target="_parent">Hasu no Mura はすのむら</a></li>
<li><a href="/p?tetroctb" target="_parent">Tetro Chain-CTB テトロチェーンCTB</a></li>
<li><a href="/p?edamame" target="_parent">Edamame</a></li>
<li><a href="/p?marutaring" target="_parent">Marutaring マルタリング</a></li>
<li><a href="/p?heavydots" target="_parent">Heavy Dots</a></li>
<li><a href="/p?bhaibahan" target="_parent">Bhai Bahan</a></li>
<li><a href="/p?oasis" target="_parent">Oasis</a></li>
<li><a href="/p?circuitwalk" target="_parent">Circuit Walk</a></li>
<li><a href="/p?cornerch" target="_parent">Corner Chain 隅角チェーン</a></li>
</ul>
</main>
</body>
Binary file added src-ui/img/hasunomura.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,8 @@ ui.keypopup = {
edamame: [4, 0],
heavydots: [10, 0],
marutaring: [10, 0],
tetroctb: [10, 0]
tetroctb: [10, 0],
hasunomura: [10, 0]
},

//---------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions src-ui/js/ui/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ function toBGimage(pid) {
"firewalk",
"forestwalk",
"geradeweg",
"hasunomura",
"heteromino",
"heyapin",
"icewalk",
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="tetrochaink"></li>
<li data-pid="sansaroad"></li>
<li data-pid="cornerch"></li>
<li data-pid="hasunomura"></li>
</ul>
</div>
<div class="lists blocks">
Expand Down
1 change: 1 addition & 0 deletions src/pzpr/variety.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@
"",
{ pzprurl: "hashi", kanpen: "hashi", alias: "bridges" }
],
hasunomura: [0, 0, "はすのむら", "Hasu no Mura", "nurikabe"],
heavydots: [0, 0, "Heavy Dots", "Heavy Dots"],
hebi: [1, 0, "へびいちご", "Hebi-Ichigo", "", { old: "snakes" }],
herugolf: [0, 0, "ヘルゴルフ", "Herugolf"],
Expand Down
1 change: 1 addition & 0 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@
"bkSizeNe.cbanana": "The number is not equal to the size of the area.",
"bkSizeNe.fillmat": "The number is different from the size of the tatami.",
"bkSizeNe.hanare": "The size of the room is not equal to the number.",
"bkSizeNe.hasunomura": "The sum of the size of the diagonally adjacent blocks is not equal to the number.",
"bkSizeNe.nurikabe": "The number is not equal to the size of the area.",
"bkSizeNe.putteria": "The size of the room is not equal to the number.",
"bkSizeNe.scrin": "The size of the area is not equal to the number.",
Expand Down
42 changes: 39 additions & 3 deletions src/variety/nurikabe.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"mochinyoro",
"canal",
"norinuri",
"cornerch"
"cornerch",
"hasunomura"
],
{
//---------------------------------------------------------
Expand All @@ -26,7 +27,7 @@
autoedit_func: "qnum",
autoplay_func: "cell"
},
"MouseEvent@nurikabe": {
"MouseEvent@nurikabe,hasunomura": {
inputModes: {
edit: ["number", "clear", "info-blk"],
play: ["shade", "unshade", "info-blk"]
Expand Down Expand Up @@ -239,7 +240,7 @@
this.drawTarget();
}
},
"Graphic@nuribou,mochikoro,mochinyoro,norinuri,cornerch": {
"Graphic@nuribou,mochikoro,mochinyoro,norinuri,cornerch,hasunomura": {
bgcellcolor_func: "qsub1",
enablebcolor: true
},
Expand Down Expand Up @@ -431,6 +432,15 @@
"doneShadingDecided"
]
},
"AnsCheck@hasunomura#1": {
checklist: [
"checkShadeCellExist",
"check2x2ShadeCell",
"checkDiagonalSums",
"checkConnectShade",
"doneShadingDecided"
]
},
AnsCheck: {
checkDoubleNumberInUnshade: function() {
this.checkAllBlock(
Expand Down Expand Up @@ -615,6 +625,32 @@
);
}
},
"AnsCheck@hasunomura": {
checkDiagonalSums: function() {
this.checkAllCell(function(cell) {
if (!cell.isValidNum()) {
return false;
}

var set = new Set();
for (var dy = -2; dy <= 2; dy += 4) {
for (var dx = -2; dx <= 2; dx += 4) {
var room = cell.relcell(dx, dy).ublk;
if (room) {
set.add(room);
}
}
}

var count = 0;
set.forEach(function(block) {
count += block.clist.length;
});

return cell.getNum() !== count;
}, "bkSizeNe");
}
},
"FailCode@mochikoro,mochinyoro": {
cuNotRect: "cuNotRect.mochikoro",
csRect: "csRect.mochikoro",
Expand Down
28 changes: 28 additions & 0 deletions test/script/hasunomura.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* hasunomura.js */

ui.debug.addDebugData("hasunomura", {
url: "6/6/g2l2j2h5n6k6j",
failcheck: [
[
"brNoShade",
"pzprv3/hasunomura/6/6/. 2 . . . . /. . 2 . . . /. 2 . . 5 . /. . . . . . /. 6 . . . . /. 6 . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /. . . . . . /"
],
[
"cs2x2",
"pzprv3/hasunomura/6/6/. 2 . . . . /. . 2 . . . /. 2 . . 5 . /. . . . . . /. 6 . . . . /. 6 . . . . /# . # # # # /# # . . # # /# . # # . # /# . . . . # /. . . . . . /. . . . . . /"
],
[
"bkSizeNe",
"pzprv3/hasunomura/6/6/. 2 . . . . /. . 2 . . . /. 2 . . 5 . /. . . . . . /. 6 . . . . /. 6 . . . . /# . # # # # /# # . # . # /# . # # . # /# # # . . # /. . # # . # /. . . . # # /"
],
[
"csDivide",
"pzprv3/hasunomura/6/6/. 2 . . . . /. . 2 . . . /. 2 . . 5 . /. . . . . . /. 6 . . . . /. 6 . . . . /# . # # # . /# # . . # # /# . # # . # /# # # . . # /# . . # # # /. . . . # . /"
],
[
null,
"pzprv3/hasunomura/6/6/. 2 . . . . /. . 2 . . . /. 2 . . 5 . /. . . . . . /. 6 . . . . /. 6 . . . . /# + # # # + /# # + + # # /# + # # + # /# # # + + # /+ + # # # # /+ + + + # + /"
]
],
inputs: [] /* nurikabeと同じなので省略 */
});
Loading