+
diff --git a/src/pzpr/variety.js b/src/pzpr/variety.js
index d25fc8338..4122c1e7c 100755
--- a/src/pzpr/variety.js
+++ b/src/pzpr/variety.js
@@ -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"],
diff --git a/src/res/failcode.en.json b/src/res/failcode.en.json
index 8db5e1e7c..e66c7b7ea 100644
--- a/src/res/failcode.en.json
+++ b/src/res/failcode.en.json
@@ -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.",
diff --git a/src/res/failcode.ja.json b/src/res/failcode.ja.json
index ae9eb1157..d99e55ed9 100644
--- a/src/res/failcode.ja.json
+++ b/src/res/failcode.ja.json
@@ -845,7 +845,7 @@
"lnAdjacent.tjunction": "同じ方向の枝分かれした線が隣接しています。",
"bkMaxSizeNe.tilecity": "県の中で最も大きい市の面積と数字が違います。",
"bkSizeNe.balloon": "風船の大きさと数字が一致していません。",
- "bkUnitNe2.nuritwin": "領域に置かれているブロックの数が2つではありません。",
+ "bkUnitNe2": "領域に置かれているブロックの数が2つではありません。",
"lcDivided.tjunction": "線が分断されています。",
"csSameJunction": "黒マスが同じ方向をした複数の枝分かれした線に触れています。",
"haisuSG.recoil": "菱形から複数本の線が伸びています。",
diff --git a/src/variety/shimaguni.js b/src/variety/shimaguni.js
index 3d8e97181..f183df4f4 100644
--- a/src/variety/shimaguni.js
+++ b/src/variety/shimaguni.js
@@ -19,7 +19,8 @@
"nuritwin",
"marutaring",
"tetroctb",
- "bramble"
+ "bramble",
+ "disco"
],
{
//---------------------------------------------------------
@@ -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();
@@ -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);
}
@@ -306,7 +316,7 @@
"AreaShadeGraph@chocona,tetroctb,bramble": {
enabled: true
},
- "AreaShadeGraph@nuritwin,marutaring": {
+ "AreaShadeGraph@nuritwin,marutaring,disco": {
enabled: true,
coloring: true
},
@@ -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" },
@@ -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();
}
@@ -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)",
@@ -534,7 +545,7 @@
: this.getCircleFillColor_qnum(cell);
}
},
- "Graphic@martini,nuritwin#2": {
+ "Graphic@martini,nuritwin,disco#2": {
shadecolor: "#444444"
},
@@ -560,6 +571,14 @@
this.encodeNumber16();
}
},
+ "Encode@disco": {
+ decodePzpr: function(type) {
+ this.decodeBorder();
+ },
+ encodePzpr: function(type) {
+ this.encodeBorder();
+ }
+ },
//---------------------------------------------------------
FileIO: {
decodeData: function() {
@@ -584,6 +603,16 @@
}
}
},
+ "FileIO@disco": {
+ decodeData: function() {
+ this.decodeBorderQues();
+ this.decodeCellAns();
+ },
+ encodeData: function() {
+ this.encodeBorderQues();
+ this.encodeCellAns();
+ }
+ },
//---------------------------------------------------------
// 正解判定処理実行部
@@ -631,11 +660,11 @@
"checkShadeCellCount"
]
},
- "AnsCheck@nuritwin#1": {
+ "AnsCheck@nuritwin,disco#1": {
checklist: [
"check2x2ShadeCell",
- "checkShadeBlockSize",
- "checkSizesEqual",
+ "checkShadeBlockSize@nuritwin",
+ "checkSizesEqual@nuritwin",
"checkTwoBlocks",
"checkConnectShade",
"checkNoShadeCellInArea",
@@ -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++) {
diff --git a/test/script/disco.js b/test/script/disco.js
new file mode 100644
index 000000000..896b30903
--- /dev/null
+++ b/test/script/disco.js
@@ -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: []
+});