|
4 | 4 | } else { |
5 | 5 | pzpr.classmgr.makeCustom(pidlist, classbase); |
6 | 6 | } |
7 | | -})(["simpleloop"], { |
| 7 | +})(["simpleloop", "vertigo"], { |
8 | 8 | MouseEvent: { |
9 | 9 | inputModes: { |
10 | 10 | edit: ["clear", "info-line", "empty"], |
|
16 | 16 |
|
17 | 17 | autoplay_func: "line" |
18 | 18 | }, |
| 19 | + "MouseEvent@vertigo": { |
| 20 | + inputModes: { |
| 21 | + edit: ["clear", "info-line", "empty"], |
| 22 | + play: ["line", "diraux", "peke", "clear", "info-line"] |
| 23 | + }, |
| 24 | + mouseinputAutoPlay: function() { |
| 25 | + if (this.btn === "right") { |
| 26 | + if (this.mousestart) { |
| 27 | + this.inputdiraux_mousedown(); |
| 28 | + } else if (this.inputData === 2 || this.inputData === 3) { |
| 29 | + this.inputpeke(); |
| 30 | + } else if (this.mousemove) { |
| 31 | + this.inputdiraux_mousemove(); |
| 32 | + } |
| 33 | + } else { |
| 34 | + if (this.mousestart || this.mousemove) { |
| 35 | + this.inputLine(); |
| 36 | + } else if (this.mouseend && this.notInputted()) { |
| 37 | + this.clickdiraux(); |
| 38 | + } |
| 39 | + } |
| 40 | + }, |
| 41 | + mouseinput_other: function() { |
| 42 | + if (this.inputMode === "diraux") { |
| 43 | + if (this.mousestart || this.mousemove) { |
| 44 | + this.inputdiraux_mousemove(); |
| 45 | + } else if (this.mouseend && this.notInputted()) { |
| 46 | + this.clickdiraux(); |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | + }, |
19 | 51 | Cell: { |
20 | 52 | noLP: function(dir) { |
21 | 53 | return this.isEmpty(); |
| 54 | + }, |
| 55 | + isLineShapeEndpoint: function() { |
| 56 | + return this.isLineCurve(); |
22 | 57 | } |
23 | 58 | }, |
24 | 59 | Border: { |
|
30 | 65 | LineGraph: { |
31 | 66 | enabled: true |
32 | 67 | }, |
| 68 | + "LineGraph@vertigo": { |
| 69 | + isLineCross: true |
| 70 | + }, |
33 | 71 |
|
34 | 72 | Graphic: { |
35 | 73 | irowake: true, |
36 | 74 |
|
37 | | - numbercolor_func: "qnum", |
38 | | - |
39 | 75 | gridcolor_type: "SLIGHT", |
40 | 76 |
|
41 | 77 | paint: function() { |
|
46 | 82 |
|
47 | 83 | this.drawLines(); |
48 | 84 | this.drawPekes(); |
| 85 | + if (this.pid === "vertigo") { |
| 86 | + this.drawBorderAuxDir(); |
| 87 | + } |
49 | 88 |
|
50 | 89 | this.drawChassis(); |
51 | 90 | }, |
|
85 | 124 | }); |
86 | 125 | } |
87 | 126 | }, |
| 127 | + "FileIO@vertigo": { |
| 128 | + decodeData: function() { |
| 129 | + this.decodeEmpty(); |
| 130 | + this.decodeBorderArrowAns(); |
| 131 | + }, |
| 132 | + encodeData: function() { |
| 133 | + this.encodeEmpty(); |
| 134 | + this.encodeBorderArrowAns(); |
| 135 | + } |
| 136 | + }, |
88 | 137 |
|
89 | 138 | AnsCheck: { |
90 | 139 | checklist: [ |
91 | 140 | "checkBranchLine", |
92 | | - "checkCrossLine", |
| 141 | + "checkCrossLine@!vertigo", |
| 142 | + "checkSameTurns@vertigo", |
93 | 143 | "checkDeadendLine+", |
94 | 144 | "checkOneLoop", |
95 | | - "checkNoLine" |
96 | | - ] |
| 145 | + "checkNoLine+" |
| 146 | + ], |
| 147 | + |
| 148 | + checkSameTurns: function() { |
| 149 | + var checkOnly = this.checkOnly; |
| 150 | + this.checkLineShape(function(path) { |
| 151 | + if (path.cells[0].isnull || path.cells[1].isnull) { |
| 152 | + return false; |
| 153 | + } |
| 154 | + |
| 155 | + var dirs1 = path.cells[0].adjborder; |
| 156 | + var dirs2 = path.cells[1].adjborder; |
| 157 | + |
| 158 | + for (var dir in dirs1) { |
| 159 | + if (!dirs1[dir].isLine() && !dirs2[dir].isLine()) { |
| 160 | + return false; |
| 161 | + } |
| 162 | + } |
| 163 | + |
| 164 | + if (!checkOnly) { |
| 165 | + for (var dir in dirs1) { |
| 166 | + dirs1[dir].seterr(1); |
| 167 | + dirs2[dir].seterr(1); |
| 168 | + } |
| 169 | + } |
| 170 | + return true; |
| 171 | + }, "lcNotUTurns"); |
| 172 | + } |
97 | 173 | } |
98 | 174 | }); |
0 commit comments