Skip to content

Commit 980538b

Browse files
committed
Add Elastic Link
1 parent 273cb40 commit 980538b

11 files changed

Lines changed: 348 additions & 52 deletions

File tree

src-ui/changes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@
3333
<main>
3434
<div style="margin-bottom: 5px;"><b>Latest types</b> (<em><a href="/list.html" target="_parent">all types</a></em>)</div>
3535
<ul>
36+
<li><a href="/p?elasticlink" target="_parent">Elastic Link</a></li>
3637
<li><a href="/p?landmeasure" target="_parent">Land Measurement</a></li>
3738
<li><a href="/p?trizone" target="_parent">Trizone サントイッチ</a></li>
3839
<li><a href="/p?ubahn" target="_parent">U-Bahn</a></li>
3940
<li><a href="/p?soulmates" target="_parent">Soul Mates ソウルメイツ</a></li>
4041
<li><a href="/p?longest" target="_parent">The Longest 短辺消失</a></li>
4142
<li><a href="/p?yokeimoji" target="_parent">Yokeimoji Cross 余計文字クロス</a></li>
42-
<li><a href="/p?golemgrad" target="_parent">Golem Grad</a></li>
4343
</ul>
4444
</main>
4545
</body>

src-ui/js/ui/KeyPopup.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ ui.keypopup = {
261261
golemgrad: [10, 0],
262262
topo: [10, 10],
263263
soulmates: [10, 10],
264-
landmeasure: [10, 0]
264+
landmeasure: [10, 0],
265+
elasticlink: [10, 0]
265266
},
266267

267268
//---------------------------------------------------------------------------
@@ -526,6 +527,9 @@ ui.keypopup = {
526527
if (pid === "familyphoto") {
527528
itemlist.push(["q", "●"]);
528529
}
530+
if (pid === "elasticlink") {
531+
itemlist.push(["q", "○"]);
532+
}
529533
if (
530534
pid === "icelom" ||
531535
pid === "icelom2" ||

src-ui/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
239239
<li data-pid="wataridori"></li>
240240
<li data-pid="uturns"></li>
241241
<li data-pid="golemgrad"></li>
242+
<li data-pid="elasticlink"></li>
242243
</ul>
243244
</div>
244245
<div class="lists lines">

src/pzpr/variety.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161
doubleback: [0, 0, "Double Back", "Double Back", "country"],
162162
easyasabc: [0, 0, "ABCプレース", "Easy as ABC"],
163163
edamame: [0, 0, "Edamame", "Edamame", "kaidan"],
164+
elasticlink: [0, 0, "Elastic Link", "Elastic Link"],
164165
energywalk: [0, 0, "Energy Walk", "Energy Walk", "icewalk"],
165166
evolmino: [0, 0, "シンカミノ", "Evolmino"],
166167
factors: [0, 0, "因子の部屋", "Rooms of Factors"],

src/res/failcode.en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,7 @@
565565
"laLenNe": "The length of a line is wrong.",
566566
"laLoop": "A line forms a loop.",
567567
"laMoveOver.herugolf": "You make a bogey or more.",
568+
"laNoCurve": "A line doesn't turn.",
568569
"laOnBorder": "There is a line across a border.",
569570
"laOnHole.herugolf": "A line goes through a hole.",
570571
"laOnIce.oyakodori": "A line goes through a nest cell.",
@@ -668,6 +669,7 @@
668669
"lnLengthGt3": "A line is longer than 3 cells.",
669670
"lnLengthLt.pencils": "A line is shorter than the connected pencil.",
670671
"lnLengthLt3": "A line is shorter than 3 cells.",
672+
"lnLengthNe.elasticlink": "A number doesn't overlap a segment of the correct length.",
671673
"lnLengthNe3.wittgen": "A block does not cover exactly 3 cells.",
672674
"lnLenLt.anglers": "A line is shorter than the number.",
673675
"lnLenLt.reflect": "The lines passing a triangle are too short.",
@@ -833,6 +835,7 @@
833835
"nmMoveNe.tren": "A block cannot move in the correct number of spaces.",
834836
"nmNoLine.amibo": "No bar connects to a white circle.",
835837
"nmNoLine.coffeemilk": "A white or black circle doesn't have a line.",
838+
"nmNoLine.elasticlink": "A number or circle doesn't have a line.",
836839
"nmNoLine.firefly": "There is a lonely firefly.",
837840
"nmNoLine.ichimaga": "A circle doesn't start any line.",
838841
"nmNoLine.kusabi": "A circle is not connected to another object.",
@@ -946,6 +949,7 @@
946949
"routeLenLoop": "The route does not contain a loop.",
947950
"routeIgnoreCP.nurimaze": "There is a circle out of the shortest route from S to G.",
948951
"routePassDeadEnd.nurimaze": "There is a triangle on the shortest route from S to G.",
952+
"segAlternate": "Two connected segments don't have a length difference of exactly 1.",
949953
"segBlackEq.balance": "Segments through a black circle are equal.",
950954
"segDiff.geradeweg": "Segments have different length.",
951955
"segLong.balance": "A segment is too long.",

src/variety-common/Answer.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,23 @@ pzpr.classmgr.makeCommon({
448448
}
449449
},
450450

451+
checkLoop: function() {
452+
var paths = this.board.linegraph.components;
453+
for (var r = 0; r < paths.length; r++) {
454+
var path = paths[r];
455+
if (path.circuits === 0) {
456+
continue;
457+
}
458+
459+
this.failcode.add("laLoop");
460+
if (this.checkOnly) {
461+
break;
462+
}
463+
this.board.border.setnoerr();
464+
path.setedgeerr(1);
465+
}
466+
},
467+
451468
//---------------------------------------------------------------------------
452469
// ans.checkConnectLineCount() ○などがないセルから出ている線の本数について判定する
453470
//---------------------------------------------------------------------------

src/variety/country.js

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,25 +1858,6 @@
18581858
return cell1.lcnt === 1 && cell2.lcnt === 1;
18591859
}, "lnDeadEndAround");
18601860
},
1861-
checkLoop: function() {
1862-
var bd = this.board;
1863-
var paths = bd.linegraph.components;
1864-
for (var r = 0; r < paths.length; r++) {
1865-
if (
1866-
paths[r].clist.some(function(cell) {
1867-
return cell.lcnt !== 2;
1868-
})
1869-
) {
1870-
continue;
1871-
}
1872-
this.failcode.add("laLoop");
1873-
if (this.checkOnly) {
1874-
break;
1875-
}
1876-
this.board.border.setnoerr();
1877-
paths[r].setedgeerr(1);
1878-
}
1879-
},
18801861
checkLinesInRoom: function() {
18811862
var bd = this.board;
18821863
var paths = bd.linegraph.components;

0 commit comments

Comments
 (0)