Skip to content

Commit 918a020

Browse files
authored
Add Robotic Walk
1 parent 28d47f5 commit 918a020

9 files changed

Lines changed: 87 additions & 4 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?roboticwalk" target="_parent">Robotic Walk</a></li>
3637
<li><a href="/p?bramble" target="_parent">Bramble</a></li>
3738
<li><a href="/p?suguru" target="_parent">Suguru (Capsules) ナンバーブロック</a></li>
3839
<li><a href="/p?topo" target="_parent">Topo</a></li>
3940
<li><a href="/p?hasunomura" target="_parent">Hasu no Mura はすのむら</a></li>
4041
<li><a href="/p?tetroctb" target="_parent">Tetro Chain-CTB テトロチェーンCTB</a></li>
4142
<li><a href="/p?edamame" target="_parent">Edamame</a></li>
42-
<li><a href="/p?marutaring" target="_parent">Marutaring マルタリング</a></li>
4343
</ul>
4444
</main>
4545
</body>

src-ui/js/ui/KeyPopup.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ ui.keypopup = {
242242
circuitwalk: [10, 0],
243243
morningwalk: [10, 0],
244244
energywalk: [10, 0],
245+
roboticwalk: [10, 0],
245246
cornerch: [10, 0],
246247
keywest: [4, 4],
247248
oasis: [10, 0],
@@ -530,7 +531,7 @@ ui.keypopup = {
530531
{
531532
text: "■",
532533
color:
533-
pid === "dbchoco" || pid === "balloon"
534+
pid === "dbchoco" || pid === "balloon" || pid === "roboticwalk"
534535
? "rgb(204,204,204)"
535536
: pid === "firewalk"
536537
? "rgb(255,192,192)"

src-ui/js/ui/MenuConfig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
case "firewalk":
173173
case "forestwalk":
174174
case "morningwalk":
175+
case "roboticwalk":
175176
case "wataridori":
176177
case "bhaibahan":
177178
idname = "loop_full";

src-ui/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
169169
<li data-pid="bunnyhop"></li>
170170
<li data-pid="morningwalk"></li>
171171
<li data-pid="bhaibahan"></li>
172+
<li data-pid="roboticwalk"></li>
172173
</ul>
173174
</div>
174175
<div class="lists loops">

src/puzzle/Config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@
545545
"firewalk",
546546
"forestwalk",
547547
"morningwalk",
548+
"roboticwalk",
548549
"wataridori",
549550
"bhaibahan"
550551
].indexOf(pid) >= 0;

src/pzpr/variety.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@
389389
"ripple",
390390
{ kanpen: "hakyukoka" }
391391
],
392+
roboticwalk: [0, 0, "Robotic Walk", "Robotic Walk", "icewalk"],
392393
roma: [0, 0, "ろーま", "Roma", "", { alias: "rome" }],
393394
roundtrip: [0, 0, "Round Trip", "Round Trip"],
394395
sananko: [0, 0, "サンアンコー", "San-Anko", "kakuru"],

src/res/failcode.en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@
626626
"lnCrossPencil.pencils": "A line crosses a pencil.",
627627
"lnCrossSelf": "A loop crosses itself.",
628628
"lnCurveEq.bhaibahan": "Two adjacent circles don't have one straight line and one turn.",
629+
"lnCurveEq.roboticwalk": "Two connected gray cells don't have one straight line and one turn.",
629630
"lnCurveOnCir.pipelink": "A line turns on a circle.",
630631
"lnCurveOnCir.portal": "A line turns on an unmarked portal.",
631632
"lnCurveOnIce": "A line turns on ice.",

src/variety/icewalk.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"forestwalk",
1313
"morningwalk",
1414
"energywalk",
15-
"circuitwalk"
15+
"circuitwalk",
16+
"roboticwalk"
1617
],
1718
{
1819
MouseEvent: {
@@ -78,7 +79,7 @@
7879
}
7980
}
8081
},
81-
"MouseEvent@morningwalk,energywalk,circuitwalk": {
82+
"MouseEvent@morningwalk,energywalk,circuitwalk,roboticwalk": {
8283
inputModes: {
8384
edit: ["shade", "number", "clear", "info-line"],
8485
play: ["line", "peke", "info-line"]
@@ -269,6 +270,11 @@
269270
return ret;
270271
}
271272
},
273+
"Cell@roboticwalk": {
274+
isLineShapeEndpoint: function() {
275+
return this.ice();
276+
}
277+
},
272278
"Cell@firewalk": {
273279
updateFireQans: function() {
274280
if (this.ice() && this.isLineCurve()) {
@@ -403,6 +409,11 @@
403409
"Graphic@circuitwalk": {
404410
icecolor: "rgb(118, 165, 175)"
405411
},
412+
"Graphic@roboticwalk": {
413+
icecolor: "rgb(192, 192, 192)"
414+
// TODO new line no err color
415+
// TODO new trial color
416+
},
406417
"Graphic@firewalk": {
407418
icecolor: "rgb(255, 192, 192)",
408419

@@ -750,6 +761,7 @@
750761
"checkForestCell@forestwalk",
751762
"checkEnergyCell@energywalk",
752763
"checkEnergyLoop@energywalk",
764+
"checkSequentialMoves@roboticwalk",
753765
"checkCircuitCell@circuitwalk",
754766
"checkSelfIntersect@circuitwalk",
755767

@@ -970,6 +982,19 @@
970982
room2.clist.seterr(1);
971983
}
972984
}
985+
},
986+
"AnsCheck@roboticwalk": {
987+
checkSequentialMoves: function() {
988+
this.checkLineShape(function(path) {
989+
var cell1 = path.cells[0],
990+
cell2 = path.cells[1];
991+
return (
992+
cell1.lcnt === 2 &&
993+
cell2.lcnt === 2 &&
994+
cell1.isLineCurve() === cell2.isLineCurve()
995+
);
996+
}, "lnCurveEq");
997+
}
973998
}
974999
}
9751000
);

test/script/roboticwalk.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/* roboticwalk.js */
2+
3+
ui.debug.addDebugData("roboticwalk", {
4+
url: "5/5/6604c6q13q",
5+
failcheck: [
6+
[
7+
"brNoLine",
8+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 0 0 0 /"
9+
],
10+
[
11+
"lnBranch",
12+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 1 0 0 0 0 /0 0 1 0 0 0 /0 1 0 0 0 0 /0 0 0 0 0 0 /0 0 0 1 0 0 /0 0 0 0 0 /1 1 0 0 0 /1 1 1 0 0 /0 0 1 1 0 /0 0 1 1 0 /0 0 0 0 0 /"
13+
],
14+
[
15+
"lnCross",
16+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 0 0 0 0 0 /0 0 0 1 1 0 /0 0 0 0 0 0 /0 0 1 1 0 0 /0 0 0 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 1 0 0 /0 0 0 0 0 /"
17+
],
18+
[
19+
"lnCurveEq",
20+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 0 0 0 0 0 /0 0 0 1 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 1 1 0 0 /0 0 0 0 0 /0 0 0 0 0 /0 0 1 1 0 /0 0 1 1 0 /0 1 0 1 0 /0 0 0 0 0 /"
21+
],
22+
[
23+
"lnCurveEq",
24+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 0 0 0 0 0 /0 0 1 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 1 0 1 1 0 /0 0 0 0 0 /0 0 0 0 0 /0 1 1 0 0 /0 1 1 0 0 /1 1 1 0 0 /0 0 0 0 0 /"
25+
],
26+
[
27+
"bkSizeLt",
28+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 0 0 0 1 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 0 0 1 0 0 /0 0 1 1 1 0 /0 0 0 0 0 /0 0 0 1 1 /0 0 0 1 1 /0 0 1 1 1 /0 1 0 0 1 /0 0 0 0 0 /"
29+
],
30+
[
31+
"bkSizeGt",
32+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 1 1 1 0 0 /0 0 1 0 0 0 /0 0 0 0 0 0 /0 1 0 0 0 0 /0 0 0 1 0 0 /0 0 0 0 0 /1 0 0 1 0 /1 1 1 1 0 /1 1 1 1 0 /0 0 1 1 0 /0 0 0 0 0 /"
33+
],
34+
[
35+
"lnPlLoop",
36+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 1 0 1 1 0 /0 0 0 0 1 0 /0 1 0 0 0 0 /0 0 1 0 0 0 /0 0 1 1 0 0 /0 0 0 0 0 /1 1 1 0 1 /1 1 1 1 0 /0 0 1 1 0 /0 0 0 1 0 /0 0 0 0 0 /"
37+
],
38+
[
39+
"lnIsolate",
40+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 1 1 0 0 0 /0 0 0 0 0 0 /0 0 0 0 0 0 /0 1 0 1 0 0 /0 0 0 0 0 0 /0 0 0 0 0 /1 0 1 0 0 /1 0 1 0 0 /1 0 1 0 0 /0 1 0 0 0 /0 0 0 0 0 /"
41+
],
42+
[
43+
"lnDeadEnd",
44+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 1 1 0 0 0 /0 0 1 -1 0 0 /0 1 0 0 0 0 /0 0 0 0 0 0 /0 0 0 1 0 0 /0 0 0 0 0 /1 0 0 0 0 /1 1 1 1 0 /0 0 1 1 0 /0 0 1 1 0 /0 0 0 0 0 /"
45+
],
46+
[
47+
null,
48+
"pzprv3/roboticwalk/5/5/6 . # # . /. . # # . /. . 1 3 . /. . # . . /. # # . . /0 1 1 1 0 0 /0 0 1 0 0 0 /0 1 0 0 0 0 /0 0 0 0 0 0 /0 0 0 1 0 0 /0 0 0 0 0 /1 0 0 1 0 /1 1 1 1 0 /0 0 1 1 0 /0 0 1 1 0 /0 0 0 0 0 /"
49+
]
50+
],
51+
inputs: []
52+
});

0 commit comments

Comments
 (0)