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
Binary file added src-ui/img/bramble.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ ui.keypopup = {
marutaring: [10, 0],
tetroctb: [10, 0],
hasunomura: [10, 0],
bramble: [10, 0],
topo: [10, 10]
},

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 @@ -119,6 +119,7 @@ function toBGimage(pid) {
"bdwalk",
"bhaibahan",
"bosnianroad",
"bramble",
"brownies",
"bunnyhop",
"castle",
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="nuritwin"></li>
<li data-pid="marutaring"></li>
<li data-pid="tetroctb"></li>
<li data-pid="bramble"></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 @@ -112,6 +112,7 @@
bosanowa: [1, 0, "ボサノワ", "Bosanowa", "", { alias: "bossanova" }],
bosnianroad: [0, 0, "Bosnian Road", "Bosnian Road"],
box: [0, 0, "ボックス", "Box"],
bramble: [0, 0, "Bramble", "Bramble", "shimaguni"],
brownies: [0, 0, "ブラウニー", "Brownies", "yosenabe"],
bunnyhop: [0, 0, "Bunnyhop", "Bunnyhop", "", { alias: "bnuuyhop" }],
cave: [1, 0, "バッグ", "Cave", "kurodoko", { alias: "bag" }],
Expand Down
3 changes: 2 additions & 1 deletion src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@
"csGt4": "The size of a mass of shaded cells is over four.",
"csGtLimit.kissing": "Two blocks are adjacent in an invalid location.",
"csGtN.isowatari": "The size of a mass of shaded cells is greater than the indicated number.",
"csLoop.parquet": "There is a loop of shaded cells.",
"csLoop": "There is a loop of shaded cells.",
"csLt1.edamame": "A rectangle has no circle in the middle.",
"csLt1.nothree": "A dot doesn't overlap a shaded cell.",
"csLt1.sumiwake": "A circle doesn't overlap a shaded cell.",
Expand Down Expand Up @@ -937,6 +937,7 @@
"shDiag.batten": "A checkerboard pattern isn't marked with a clue.",
"shDiag.battleship": "Two ships are diagonally adjacent.",
"shDiag.bosnianroad": "The loop touches itself diagonally.",
"shDiag.bramble": "Two single-cell blocks are diagonally adjacent.",
"shDiag.pentatouch": "A place where two pieces touch isn't marked with a point.",
"shDiag.snake": "The snake touches itself diagonally.",
"shDiag": "Two pieces are diagonally adjacent.",
Expand Down
2 changes: 1 addition & 1 deletion src/res/failcode.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@
"csDivide": "黒マスが分断されています。",
"csDivide8.mochikoro": "孤立した白マスのブロックがあります。",
"csGt2": "2マスより大きい黒マスのカタマリがあります。",
"csLoop.parquet": "黒マスがループになっています。",
"csLoop": "黒マスがループになっています。",
"csLt2": "1マスだけの黒マスのカタマリがあります。",
"csNoLevel.aquarium": "ひとつながりの水のマスの水位が等しくなっていません。",
"csNoSupport.aquarium": "水の入っているマスの隣や下のマスが空白になっています。",
Expand Down
89 changes: 81 additions & 8 deletions src/variety/shimaguni.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"martini",
"nuritwin",
"marutaring",
"tetroctb"
"tetroctb",
"bramble"
],
{
//---------------------------------------------------------
Expand All @@ -38,13 +39,13 @@
play: ["shade", "unshade", "number"]
}
},
"MouseEvent@cocktail,nuritwin,marutaring,tetroctb": {
"MouseEvent@cocktail,nuritwin,marutaring,tetroctb,bramble": {
inputModes: {
edit: ["border", "number", "clear", "info-blk"],
play: ["shade", "unshade", "info-blk"]
}
},
"MouseEvent@cocktail,martini,tetroctb#2": {
"MouseEvent@cocktail,martini,tetroctb,bramble#2": {
dispInfoBlk: function() {
var cell = this.getcell();
this.mousereset();
Expand Down Expand Up @@ -124,7 +125,7 @@
enableSubNumberArray: true,
disableAnum: true
},
"Cell@chocona,hinge,heyablock,cocktail,tetroctb": {
"Cell@chocona,hinge,heyablock,cocktail,tetroctb,bramble": {
minnum: 0
},
"Cell@martini": {
Expand Down Expand Up @@ -302,7 +303,7 @@
}
},

"AreaShadeGraph@chocona,tetroctb": {
"AreaShadeGraph@chocona,tetroctb,bramble": {
enabled: true
},
"AreaShadeGraph@nuritwin,marutaring": {
Expand Down Expand Up @@ -338,7 +339,7 @@
"AreaStoneGraph@stostone": {
coloring: true
},
"AreaUnshadeGraph@heyablock,martini": {
"AreaUnshadeGraph@heyablock,martini,bramble": {
enabled: true
},
"AreaUnshadeGraph@martini#1": {
Expand All @@ -357,7 +358,7 @@
"AreaRoomGraph@martini": {
hastop: false
},
"AreaShade8Graph@cocktail,martini,tetroctb": {
"AreaShade8Graph@cocktail,martini,tetroctb,bramble": {
enabled: true
},

Expand Down Expand Up @@ -661,7 +662,19 @@
"doneShadingDecided"
]
},
"AnsCheck@shimaguni,stostone,heyablock,cocktail,martini": {
"AnsCheck@bramble#1": {
checklist: [
"checkShadeCellExist+",
"checkOverShadeCell",
"checkSideAreaShadeCell",
"checkConnectUnshadeOutside",
"checkAdjacentSingle",
"checkShadeCellCount",
"checkConnect8Shade",
"doneShadingDecided"
]
},
"AnsCheck@shimaguni,stostone,heyablock,cocktail,martini,bramble": {
checkSideAreaShadeCell: function() {
this.checkSideAreaCell(
function(cell1, cell2) {
Expand Down Expand Up @@ -1152,6 +1165,66 @@
this.checkOneArea(this.board.sblk8mgr, "csDivide");
}
},
"AnsCheck@bramble": {
checkOverShadeCell: function() {
this.checkAllArea(
this.board.sblkmgr,
function(w, h, a, n) {
return a <= 2;
},
"csGt2"
);
},
checkConnect8Shade: function() {
this.checkOneArea(this.board.sblk8mgr, "csDivide");
},
checkAdjacentSingle: function() {
var bd = this.board;
for (var c = 0; c < bd.cell.length; c++) {
var cell = bd.cell[c];
if (cell.bx >= bd.maxbx - 1 || cell.by >= bd.maxby - 1) {
continue;
}

var bx = cell.bx,
by = cell.by;
var clist = bd
.cellinside(bx, by, bx + 2, by + 2)
.filter(function(cc) {
return cc.sblk && cc.sblk.clist.length === 1;
});
if (clist.length !== 2) {
continue;
}

this.failcode.add("shDiag");
if (this.checkOnly) {
break;
}
clist.seterr(1);
}
},
checkConnectUnshadeOutside: function() {
var bd = this.board;
for (var r = 0; r < bd.ublkmgr.components.length; r++) {
var clist = bd.ublkmgr.components[r].clist;
var d = clist.getRectSize();
if (
d.x1 === 1 ||
d.x2 === bd.maxbx - 1 ||
d.y1 === 1 ||
d.y2 === bd.maxby - 1
) {
continue;
}
this.failcode.add("csLoop");
if (this.checkOnly) {
break;
}
clist.seterr(1);
}
}
},

FailCode: {
bkShadeDivide: "bkShadeDivide",
Expand Down
40 changes: 40 additions & 0 deletions test/script/bramble.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* bramble.js */

ui.debug.addDebugData("bramble", {
url: "5/5/4cql3su032g222g",
failcheck: [
[
"brNoShade",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /. . . . . /"
],
[
"csGt2",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /# # . # # /. # . . . /# . # . . /. . . . . /# # . . . /"
],
[
"shDiag",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /# # . # # /. . # . . /# # . . # /. . # . # /# # . # . /"
],
[
"cbShade",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /. . . . . /. . . . . /# . . . . /# . # # . /. # . . . /"
],
[
"csLoop",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /. # # . # /# . . # . /. # # . # /# . . . # /# . . . . /"
],
[
"bkShadeNe",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /# . . # . /. # # . # /# . . . # /. . # # . /# # . . . /"
],
[
"csDivide",
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /# # . # # /. . # . . /# # . . . /. . # . # /# # . . # /"
],
[
null,
"pzprv3/bramble/5/5/7/0 0 0 1 1 /0 0 0 2 3 /4 4 4 2 3 /5 5 6 6 3 /5 5 6 6 3 /3 . . 2 . /. . . . 2 /2 . . . . /2 . . . . /. . . . . /# # + # # /+ + # + + /# # + + # /+ + # # + /# # + + # /"
]
],
inputs: []
});
Loading