Skip to content

Commit 8d696b6

Browse files
committed
Add Disconnection
1 parent 54b4107 commit 8d696b6

3 files changed

Lines changed: 43 additions & 12 deletions

File tree

src-ui/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
103103
<li data-pid="marutaring"></li>
104104
<li data-pid="tetroctb"></li>
105105
<li data-pid="bramble"></li>
106+
<li data-pid="disco"></li>
106107
</ul>
107108
</div>
108109
<div class="lists blocks">

src/pzpr/variety.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
dbchoco: [0, 0, "ダブルチョコ", "Double Choco", "cbblock"],
151151
detour: [0, 0, "Detour", "Detour", "country"],
152152
diamond: [0, 0, "Diamond Chain", "Diamond Chain"],
153+
disco: [0, 0, "ディスコネクション", "Disconnection", "shimaguni"],
153154
disloop: [0, 0, "Disorderly Loop", "Disorderly Loop", "tapaloop"],
154155
distopia: [0, 0, "Distopia", "Distopia", "statuepark"],
155156
dominion: [0, 0, "ドミニオン", "Dominion"],

src/variety/shimaguni.js

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"nuritwin",
2020
"marutaring",
2121
"tetroctb",
22-
"bramble"
22+
"bramble",
23+
"disco"
2324
],
2425
{
2526
//---------------------------------------------------------
@@ -45,6 +46,15 @@
4546
play: ["shade", "unshade", "info-blk"]
4647
}
4748
},
49+
"MouseEvent@disco": {
50+
inputModes: {
51+
edit: ["info-blk"],
52+
play: ["shade", "unshade", "info-blk"]
53+
},
54+
mouseinputAutoEdit: function() {
55+
this.inputborder();
56+
}
57+
},
4858
"MouseEvent@cocktail,martini,tetroctb,bramble#2": {
4959
dispInfoBlk: function() {
5060
var cell = this.getcell();
@@ -184,7 +194,7 @@
184194
Board: {
185195
hasborder: 1
186196
},
187-
"Board@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb": {
197+
"Board@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb,disco": {
188198
addExtraInfo: function() {
189199
this.stonegraph = this.addInfoList(this.klass.AreaStoneGraph);
190200
}
@@ -306,7 +316,7 @@
306316
"AreaShadeGraph@chocona,tetroctb,bramble": {
307317
enabled: true
308318
},
309-
"AreaShadeGraph@nuritwin,marutaring": {
319+
"AreaShadeGraph@nuritwin,marutaring,disco": {
310320
enabled: true,
311321
coloring: true
312322
},
@@ -318,7 +328,7 @@
318328
component.hinge = null;
319329
}
320330
},
321-
"AreaStoneGraph:AreaShadeGraph@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb": {
331+
"AreaStoneGraph:AreaShadeGraph@shimaguni,stostone,heyablock,cocktail,martini,nuritwin,marutaring,tetroctb,disco": {
322332
// Same as LITS AreaTetrominoGraph
323333
enabled: true,
324334
relation: { "cell.qans": "node", "border.ques": "separator" },
@@ -374,20 +384,21 @@
374384
paint: function() {
375385
this.drawBGCells();
376386

377-
if (this.pid !== "nuritwin") {
387+
if (this.pid !== "nuritwin" && this.pid !== "disco") {
378388
this.drawGrid();
379389
}
380390

381391
if (
382392
this.pid === "stostone" ||
383393
this.pid === "nuritwin" ||
394+
this.pid === "disco" ||
384395
this.pid === "marutaring"
385396
) {
386397
this.drawDotCells_stostone();
387398
}
388399
this.drawShadedCells();
389400

390-
if (this.pid === "nuritwin") {
401+
if (this.pid === "nuritwin" || this.pid === "disco") {
391402
this.drawGrid();
392403
}
393404

@@ -423,7 +434,7 @@
423434
);
424435
}
425436
},
426-
"Graphic@stostone,nuritwin,marutaring#1": {
437+
"Graphic@stostone,nuritwin,marutaring,disco#1": {
427438
irowakeblk: true,
428439
bgcellcolor_func: "error1",
429440
bcolor: "rgb(80, 204, 80)",
@@ -534,7 +545,7 @@
534545
: this.getCircleFillColor_qnum(cell);
535546
}
536547
},
537-
"Graphic@martini,nuritwin#2": {
548+
"Graphic@martini,nuritwin,disco#2": {
538549
shadecolor: "#444444"
539550
},
540551

@@ -560,6 +571,14 @@
560571
this.encodeNumber16();
561572
}
562573
},
574+
"Encode@disco": {
575+
decodePzpr: function(type) {
576+
this.decodeBorder();
577+
},
578+
encodePzpr: function(type) {
579+
this.encodeBorder();
580+
}
581+
},
563582
//---------------------------------------------------------
564583
FileIO: {
565584
decodeData: function() {
@@ -584,6 +603,16 @@
584603
}
585604
}
586605
},
606+
"FileIO@disco": {
607+
decodeData: function() {
608+
this.decodeBorderQues();
609+
this.decodeCellAns();
610+
},
611+
encodeData: function() {
612+
this.encodeBorderQues();
613+
this.encodeCellAns();
614+
}
615+
},
587616

588617
//---------------------------------------------------------
589618
// 正解判定処理実行部
@@ -631,11 +660,11 @@
631660
"checkShadeCellCount"
632661
]
633662
},
634-
"AnsCheck@nuritwin#1": {
663+
"AnsCheck@nuritwin,disco#1": {
635664
checklist: [
636665
"check2x2ShadeCell",
637-
"checkShadeBlockSize",
638-
"checkSizesEqual",
666+
"checkShadeBlockSize@nuritwin",
667+
"checkSizesEqual@nuritwin",
639668
"checkTwoBlocks",
640669
"checkConnectShade",
641670
"checkNoShadeCellInArea",
@@ -987,7 +1016,7 @@
9871016
this.checkOneArea(this.board.sblk8mgr, "csDivide");
9881017
}
9891018
},
990-
"AnsCheck@nuritwin": {
1019+
"AnsCheck@nuritwin,disco": {
9911020
checkShadeBlockSize: function() {
9921021
var blocks = this.board.stonegraph.components;
9931022
for (var id = 0; id < blocks.length; id++) {

0 commit comments

Comments
 (0)