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?vertigo" target="_parent">Vertigo</a></li>
<li><a href="/p?mrokmrno" target="_parent">Mr. OK and Mr. NO</a></li>
<li><a href="/p?slovak" target="_parent">Slovak Sums</a></li>
<li><a href="/p?anymino" target="_parent">Anymino</a></li>
<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>
</ul>
</main>
</body>
Binary file added src-ui/img/vertigo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src-ui/js/ui/Misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ function toBGimage(pid) {
"tslither",
"turnaround",
"ubahn",
"vertigo",
"voxas",
"vslither",
"wafusuma",
Expand Down
1 change: 1 addition & 0 deletions src-ui/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ <h2 id="title"><span lang="ja">パズルの種類のリスト</span><span lang="
<li data-pid="turnrun"></li>
<li data-pid="orbital"></li>
<li data-pid="circuitwalk"></li>
<li data-pid="vertigo"></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 @@ -496,6 +496,7 @@
usotatami: [0, 0, "ウソタタミ", "Uso-tatami", "fillmat"],
usoone: [0, 0, "ウソワン", "Uso-one"],
uturns: [0, 0, "U-Turns", "U-Turns", "kusabi"],
vertigo: [0, 0, "Vertigo", "Vertigo", "simpleloop"],
view: [1, 0, "ヴィウ", "View", "sukoro"],
voxas: [0, 0, "Voxas", "Voxas"],
vslither: [0, 0, "Vertex Slitherlink", "Vertex Slitherlink"],
Expand Down
1 change: 1 addition & 0 deletions src/res/failcode.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@
"lnNotRect.nagenawa": "There is a non-rectangle loop.",
"lnNotSq.tajmahal": "A segment doesn't form a square.",
"lcNotUTurns.uturns": "A line does not turn twice in the same direction between circles.",
"lcNotUTurns.vertigo": "A line turns in the wrong direction.",
"lnOnCenter.midloop": "A circle is not the center point of a line.",
"lnOnClue.tajmahal": "A corner is on top of a clue.",
"lnOnCorner.tajmahal": "A segment overlaps a corner.",
Expand Down
88 changes: 82 additions & 6 deletions src/variety/simpleloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
} else {
pzpr.classmgr.makeCustom(pidlist, classbase);
}
})(["simpleloop"], {
})(["simpleloop", "vertigo"], {
MouseEvent: {
inputModes: {
edit: ["clear", "info-line", "empty"],
Expand All @@ -16,9 +16,44 @@

autoplay_func: "line"
},
"MouseEvent@vertigo": {
inputModes: {
edit: ["clear", "info-line", "empty"],
play: ["line", "diraux", "peke", "clear", "info-line"]
},
mouseinputAutoPlay: function() {
if (this.btn === "right") {
if (this.mousestart) {
this.inputdiraux_mousedown();
} else if (this.inputData === 2 || this.inputData === 3) {
this.inputpeke();
} else if (this.mousemove) {
this.inputdiraux_mousemove();
}
} else {
if (this.mousestart || this.mousemove) {
this.inputLine();
} else if (this.mouseend && this.notInputted()) {
this.clickdiraux();
}
}
},
mouseinput_other: function() {
if (this.inputMode === "diraux") {
if (this.mousestart || this.mousemove) {
this.inputdiraux_mousemove();
} else if (this.mouseend && this.notInputted()) {
this.clickdiraux();
}
}
}
},
Cell: {
noLP: function(dir) {
return this.isEmpty();
},
isLineShapeEndpoint: function() {
return this.isLineCurve();
}
},
Border: {
Expand All @@ -30,12 +65,13 @@
LineGraph: {
enabled: true
},
"LineGraph@vertigo": {
isLineCross: true
},

Graphic: {
irowake: true,

numbercolor_func: "qnum",

gridcolor_type: "SLIGHT",

paint: function() {
Expand All @@ -46,6 +82,9 @@

this.drawLines();
this.drawPekes();
if (this.pid === "vertigo") {
this.drawBorderAuxDir();
}

this.drawChassis();
},
Expand Down Expand Up @@ -85,14 +124,51 @@
});
}
},
"FileIO@vertigo": {
decodeData: function() {
this.decodeEmpty();
this.decodeBorderArrowAns();
},
encodeData: function() {
this.encodeEmpty();
this.encodeBorderArrowAns();
}
},

AnsCheck: {
checklist: [
"checkBranchLine",
"checkCrossLine",
"checkCrossLine@!vertigo",
"checkSameTurns@vertigo",
"checkDeadendLine+",
"checkOneLoop",
"checkNoLine"
]
"checkNoLine+"
],

checkSameTurns: function() {
var checkOnly = this.checkOnly;
this.checkLineShape(function(path) {
if (path.cells[0].isnull || path.cells[1].isnull) {
return false;
}

var dirs1 = path.cells[0].adjborder;
var dirs2 = path.cells[1].adjborder;

for (var dir in dirs1) {
if (!dirs1[dir].isLine() && !dirs2[dir].isLine()) {
return false;
}
}

if (!checkOnly) {
for (var dir in dirs1) {
dirs1[dir].seterr(1);
dirs2[dir].seterr(1);
}
}
return true;
}, "lcNotUTurns");
}
}
});
46 changes: 46 additions & 0 deletions test/script/vertigo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
ui.debug.addDebugData("vertigo", {
url: "5/5/o080p",
failcheck: [
[
"lnBranch",
"pzprv3/vertigo/5/5/* * . . . /. . . . . /. * . . . /. . . . . /* * . . * /0 0 1 1 /1 1 0 0 /0 0 1 0 /1 1 0 1 /0 0 1 0 /0 0 1 1 1 /1 0 1 1 1 /1 0 0 0 1 /0 0 1 1 0 /"
],
[
"lcNotUTurns",
"pzprv3/vertigo/5/5/* * . . . /. . . . . /. * . . . /. . . . . /* * . . * /0 0 1 1 /1 1 1 0 /0 0 1 0 /1 1 0 1 /0 0 1 0 /0 0 1 0 1 /1 0 1 1 1 /1 0 0 0 1 /0 0 1 1 0 /"
],
[
"lnDeadEnd",
"pzprv3/vertigo/5/5/* * . . . /. . . . . /. * . . . /. . . . . /* * . . * /0 0 1 1 /1 1 1 0 /0 0 0 0 /1 1 1 1 /0 0 1 0 /0 0 1 0 1 /1 0 1 0 1 /1 0 1 1 1 /0 0 1 1 0 /"
],
[
"lnPlLoop",
"pzprv3/vertigo/5/5/* * . . . /. . . . . /. * . . . /. . . . . /* * . . * /0 0 1 0 /1 1 1 1 /0 0 0 0 /1 1 1 1 /0 0 1 0 /0 0 1 1 0 /1 0 1 1 1 /1 0 1 1 1 /0 0 1 1 0 /"
],
[
"ceNoLine",
"pzprv3/vertigo/5/5/* * . . . /. . . . . /. * . . . /. . . . . /* * . . * /0 0 1 1 /1 1 1 0 /0 0 1 0 /1 1 1 1 /0 0 0 0 /0 0 1 0 1 /1 0 1 1 1 /1 0 0 0 1 /0 0 0 0 0 /"
],
[
null,
"pzprv3/vertigo/5/5/* * . . . /. . . . . /. * . . . /. . . . . /* * . . * /0 0 1r 1 /1r 1 1 0 /0 0 0 0 /1 1l 1 1 /0 0 1l 0 /0 0 1 0 1 /1 0 1u 1 1d /1u 0 1 1d 1 /0 0 1 1 0 /"
]
],
inputs: [
{
input: [
"newboard,3,3",
"editmode",
"mouse,left,1,1",
"playmode",
"mouse,left,3,1,3,5",
"mouse,right,3,1,5,1,5,3",
"mouse,right,1,4",
"playmode,diraux",
"mouse,left,5,5,3,5"
],
result:
"pzprv3/vertigo/3/3/* . . /. . . /. . . /0 r /0 0 /0 l /0 1 d /-1 1 0 /"
}
]
});
Loading