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/disco.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/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function toBGimage(pid) {
"dbchoco",
"detour",
"diamond",
"disco",
"dominion",
"doppelblock",
"dotchi",
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="marutaring"></li>
<li data-pid="tetroctb"></li>
<li data-pid="bramble"></li>
<li data-pid="disco"></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 @@ -150,6 +150,7 @@
dbchoco: [0, 0, "ダブルチョコ", "Double Choco", "cbblock"],
detour: [0, 0, "Detour", "Detour", "country"],
diamond: [0, 0, "Diamond Chain", "Diamond Chain"],
disco: [0, 0, "ディスコネクション", "Disconnection", "shimaguni"],
disloop: [0, 0, "Disorderly Loop", "Disorderly Loop", "tapaloop"],
distopia: [0, 0, "Distopia", "Distopia", "statuepark"],
dominion: [0, 0, "ドミニオン", "Dominion"],
Expand Down
2 changes: 1 addition & 1 deletion src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@
"bkSumNeBn.yosenabe": "Sum of filling is not equal to a crock.",
"bkUCGe2.dosufuwa": "An area has two or more balloons.",
"bkUnitNe2.kuroclone": "There is an area without exactly two units.",
"bkUnitNe2.nuritwin": "An area doesn't have exactly two blocks.",
"bkUnitNe2": "An area doesn't have exactly two blocks.",
"bkUnknown.lohkous": "A room has a segment of invalid length.",
"bkUnshade.lapaz": "A 1x1 region is unshaded.",
"bkUnshadeConsecGt3": "There is a line of consecutive unshaded cells that goes through 2 region borders.",
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 @@ -845,7 +845,7 @@
"lnAdjacent.tjunction": "同じ方向の枝分かれした線が隣接しています。",
"bkMaxSizeNe.tilecity": "県の中で最も大きい市の面積と数字が違います。",
"bkSizeNe.balloon": "風船の大きさと数字が一致していません。",
"bkUnitNe2.nuritwin": "領域に置かれているブロックの数が2つではありません。",
"bkUnitNe2": "領域に置かれているブロックの数が2つではありません。",
"lcDivided.tjunction": "線が分断されています。",
"csSameJunction": "黒マスが同じ方向をした複数の枝分かれした線に触れています。",
"haisuSG.recoil": "菱形から複数本の線が伸びています。",
Expand Down
53 changes: 41 additions & 12 deletions src/variety/shimaguni.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"nuritwin",
"marutaring",
"tetroctb",
"bramble"
"bramble",
"disco"
],
{
//---------------------------------------------------------
Expand All @@ -45,6 +46,15 @@
play: ["shade", "unshade", "info-blk"]
}
},
"MouseEvent@disco": {
inputModes: {
edit: ["info-blk"],
play: ["shade", "unshade", "info-blk"]
},
mouseinputAutoEdit: function() {
this.inputborder();
}
},
"MouseEvent@cocktail,martini,tetroctb,bramble#2": {
dispInfoBlk: function() {
var cell = this.getcell();
Expand Down Expand Up @@ -184,7 +194,7 @@
Board: {
hasborder: 1
},
"Board@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb": {
"Board@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb,disco": {
addExtraInfo: function() {
this.stonegraph = this.addInfoList(this.klass.AreaStoneGraph);
}
Expand Down Expand Up @@ -306,7 +316,7 @@
"AreaShadeGraph@chocona,tetroctb,bramble": {
enabled: true
},
"AreaShadeGraph@nuritwin,marutaring": {
"AreaShadeGraph@nuritwin,marutaring,disco": {
enabled: true,
coloring: true
},
Expand All @@ -318,7 +328,7 @@
component.hinge = null;
}
},
"AreaStoneGraph:AreaShadeGraph@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb": {
"AreaStoneGraph:AreaShadeGraph@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb,disco": {
// Same as LITS AreaTetrominoGraph
enabled: true,
relation: { "cell.qans": "node", "border.ques": "separator" },
Expand Down Expand Up @@ -374,20 +384,21 @@
paint: function() {
this.drawBGCells();

if (this.pid !== "nuritwin") {
if (this.pid !== "nuritwin" && this.pid !== "disco") {
this.drawGrid();
}

if (
this.pid === "stostone" ||
this.pid === "nuritwin" ||
this.pid === "disco" ||
this.pid === "marutaring"
) {
this.drawDotCells_stostone();
}
this.drawShadedCells();

if (this.pid === "nuritwin") {
if (this.pid === "nuritwin" || this.pid === "disco") {
this.drawGrid();
}

Expand Down Expand Up @@ -423,7 +434,7 @@
);
}
},
"Graphic@stostone,nuritwin,marutaring#1": {
"Graphic@stostone,nuritwin,marutaring,disco#1": {
irowakeblk: true,
bgcellcolor_func: "error1",
bcolor: "rgb(80, 204, 80)",
Expand Down Expand Up @@ -534,7 +545,7 @@
: this.getCircleFillColor_qnum(cell);
}
},
"Graphic@martini,nuritwin#2": {
"Graphic@martini,nuritwin,disco#2": {
shadecolor: "#444444"
},

Expand All @@ -560,6 +571,14 @@
this.encodeNumber16();
}
},
"Encode@disco": {
decodePzpr: function(type) {
this.decodeBorder();
},
encodePzpr: function(type) {
this.encodeBorder();
}
},
//---------------------------------------------------------
FileIO: {
decodeData: function() {
Expand All @@ -584,6 +603,16 @@
}
}
},
"FileIO@disco": {
decodeData: function() {
this.decodeBorderQues();
this.decodeCellAns();
},
encodeData: function() {
this.encodeBorderQues();
this.encodeCellAns();
}
},

//---------------------------------------------------------
// 正解判定処理実行部
Expand Down Expand Up @@ -631,11 +660,11 @@
"checkShadeCellCount"
]
},
"AnsCheck@nuritwin#1": {
"AnsCheck@nuritwin,disco#1": {
checklist: [
"check2x2ShadeCell",
"checkShadeBlockSize",
"checkSizesEqual",
"checkShadeBlockSize@nuritwin",
"checkSizesEqual@nuritwin",
"checkTwoBlocks",
"checkConnectShade",
"checkNoShadeCellInArea",
Expand Down Expand Up @@ -987,7 +1016,7 @@
this.checkOneArea(this.board.sblk8mgr, "csDivide");
}
},
"AnsCheck@nuritwin": {
"AnsCheck@nuritwin,disco": {
checkShadeBlockSize: function() {
var blocks = this.board.stonegraph.components;
for (var id = 0; id < blocks.length; id++) {
Expand Down
28 changes: 28 additions & 0 deletions test/script/disco.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* disco.js */

ui.debug.addDebugData("disco", {
url: "5/5/d552apfg",
failcheck: [
[
"bkNoShade",
"pzprv3/disco/5/5/0 1 1 0 /1 0 0 1 /0 1 0 0 /1 0 1 0 /0 0 1 0 /0 1 0 1 0 /1 1 0 0 1 /0 1 1 1 1 /1 0 0 0 0 /. . . # . /. # # # # /. # . . # /# # # . # /# . # # . /"
],
[
"bkUnitNe2",
"pzprv3/disco/5/5/0 1 1 0 /1 0 0 1 /0 1 0 0 /1 0 1 0 /0 0 1 0 /0 1 0 1 0 /1 1 0 0 1 /0 1 1 1 1 /1 0 0 0 0 /. # # # . /# # . # # /. # . . # /# # # . # /# . # # . /"
],
[
"csDivide",
"pzprv3/disco/5/5/0 1 1 0 /1 0 0 1 /0 1 0 0 /1 0 1 0 /0 0 1 0 /0 1 0 1 0 /1 1 0 0 1 /0 1 1 1 1 /1 0 0 0 0 /. # . # . /# # # # # /. # . . # /# # # # . /# . # . # /"
],
[
"cs2x2",
"pzprv3/disco/5/5/0 1 1 0 /1 0 0 1 /0 1 0 0 /1 0 1 0 /0 0 1 0 /0 1 0 1 0 /1 1 0 0 1 /0 1 1 1 1 /1 0 0 0 0 /. # # # . /# # # . # /. # . . # /# # # . # /# . # # . /"
],
[
null,
"pzprv3/disco/5/5/0 1 1 0 /1 0 0 1 /0 1 0 0 /1 0 1 0 /0 0 1 0 /0 1 0 1 0 /1 1 0 0 1 /0 1 1 1 1 /1 0 0 0 0 /. # . # . /# # # # # /. # . . # /# # # . # /# . # # . /"
]
],
inputs: []
});
Loading