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
2 changes: 1 addition & 1 deletion src-ui/changes.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
<main>
<div style="margin-bottom: 5px;"><b>Latest types</b> (<em><a href="/list.html" target="_parent">all types</a></em>)</div>
<ul>
<li><a href="/p?elasticlink" target="_parent">Elastic Link</a></li>
<li><a href="/p?landmeasure" target="_parent">Land Measurement</a></li>
<li><a href="/p?trizone" target="_parent">Trizone サントイッチ</a></li>
<li><a href="/p?ubahn" target="_parent">U-Bahn</a></li>
<li><a href="/p?soulmates" target="_parent">Soul Mates ソウルメイツ</a></li>
<li><a href="/p?longest" target="_parent">The Longest 短辺消失</a></li>
<li><a href="/p?yokeimoji" target="_parent">Yokeimoji Cross 余計文字クロス</a></li>
<li><a href="/p?golemgrad" target="_parent">Golem Grad</a></li>
</ul>
</main>
</body>
6 changes: 5 additions & 1 deletion src-ui/js/ui/KeyPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ ui.keypopup = {
golemgrad: [10, 0],
topo: [10, 10],
soulmates: [10, 10],
landmeasure: [10, 0]
landmeasure: [10, 0],
elasticlink: [10, 0]
},

//---------------------------------------------------------------------------
Expand Down Expand Up @@ -526,6 +527,9 @@ ui.keypopup = {
if (pid === "familyphoto") {
itemlist.push(["q", "●"]);
}
if (pid === "elasticlink") {
itemlist.push(["q", "○"]);
}
if (
pid === "icelom" ||
pid === "icelom2" ||
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="wataridori"></li>
<li data-pid="uturns"></li>
<li data-pid="golemgrad"></li>
<li data-pid="elasticlink"></li>
</ul>
</div>
<div class="lists lines">
Expand Down
1 change: 1 addition & 0 deletions src/pzpr/variety.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
doubleback: [0, 0, "Double Back", "Double Back", "country"],
easyasabc: [0, 0, "ABCプレース", "Easy as ABC"],
edamame: [0, 0, "Edamame", "Edamame", "kaidan"],
elasticlink: [0, 0, "Elastic Link", "Elastic Link"],
energywalk: [0, 0, "Energy Walk", "Energy Walk", "icewalk"],
evolmino: [0, 0, "シンカミノ", "Evolmino"],
factors: [0, 0, "因子の部屋", "Rooms of Factors"],
Expand Down
4 changes: 4 additions & 0 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@
"laLenNe": "The length of a line is wrong.",
"laLoop": "A line forms a loop.",
"laMoveOver.herugolf": "You make a bogey or more.",
"laNoCurve": "A line doesn't turn.",
"laOnBorder": "There is a line across a border.",
"laOnHole.herugolf": "A line goes through a hole.",
"laOnIce.oyakodori": "A line goes through a nest cell.",
Expand Down Expand Up @@ -668,6 +669,7 @@
"lnLengthGt3": "A line is longer than 3 cells.",
"lnLengthLt.pencils": "A line is shorter than the connected pencil.",
"lnLengthLt3": "A line is shorter than 3 cells.",
"lnLengthNe.elasticlink": "A number doesn't overlap a segment of the correct length.",
"lnLengthNe3.wittgen": "A block does not cover exactly 3 cells.",
"lnLenLt.anglers": "A line is shorter than the number.",
"lnLenLt.reflect": "The lines passing a triangle are too short.",
Expand Down Expand Up @@ -833,6 +835,7 @@
"nmMoveNe.tren": "A block cannot move in the correct number of spaces.",
"nmNoLine.amibo": "No bar connects to a white circle.",
"nmNoLine.coffeemilk": "A white or black circle doesn't have a line.",
"nmNoLine.elasticlink": "A number or circle doesn't have a line.",
"nmNoLine.firefly": "There is a lonely firefly.",
"nmNoLine.ichimaga": "A circle doesn't start any line.",
"nmNoLine.kusabi": "A circle is not connected to another object.",
Expand Down Expand Up @@ -946,6 +949,7 @@
"routeLenLoop": "The route does not contain a loop.",
"routeIgnoreCP.nurimaze": "There is a circle out of the shortest route from S to G.",
"routePassDeadEnd.nurimaze": "There is a triangle on the shortest route from S to G.",
"segAlternate": "Two connected segments don't have a length difference of exactly 1.",
"segBlackEq.balance": "Segments through a black circle are equal.",
"segDiff.geradeweg": "Segments have different length.",
"segLong.balance": "A segment is too long.",
Expand Down
17 changes: 17 additions & 0 deletions src/variety-common/Answer.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,23 @@ pzpr.classmgr.makeCommon({
}
},

checkLoop: function() {
var paths = this.board.linegraph.components;
for (var r = 0; r < paths.length; r++) {
var path = paths[r];
if (path.circuits === 0) {
continue;
}

this.failcode.add("laLoop");
if (this.checkOnly) {
break;
}
this.board.border.setnoerr();
path.setedgeerr(1);
}
},

//---------------------------------------------------------------------------
// ans.checkConnectLineCount() ○などがないセルから出ている線の本数について判定する
//---------------------------------------------------------------------------
Expand Down
19 changes: 0 additions & 19 deletions src/variety/country.js
Original file line number Diff line number Diff line change
Expand Up @@ -1858,25 +1858,6 @@
return cell1.lcnt === 1 && cell2.lcnt === 1;
}, "lnDeadEndAround");
},
checkLoop: function() {
var bd = this.board;
var paths = bd.linegraph.components;
for (var r = 0; r < paths.length; r++) {
if (
paths[r].clist.some(function(cell) {
return cell.lcnt !== 2;
})
) {
continue;
}
this.failcode.add("laLoop");
if (this.checkOnly) {
break;
}
this.board.border.setnoerr();
paths[r].setedgeerr(1);
}
},
checkLinesInRoom: function() {
var bd = this.board;
var paths = bd.linegraph.components;
Expand Down
Loading
Loading