forked from robx/pzprjs
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsimpleloop.js
More file actions
98 lines (87 loc) · 1.63 KB
/
Copy pathsimpleloop.js
File metadata and controls
98 lines (87 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
(function(pidlist, classbase) {
if (typeof module === "object" && module.exports) {
module.exports = [pidlist, classbase];
} else {
pzpr.classmgr.makeCustom(pidlist, classbase);
}
})(["simpleloop"], {
MouseEvent: {
inputModes: {
edit: ["clear", "info-line", "empty"],
play: ["line", "peke", "clear", "info-line"]
},
mouseinputAutoEdit: function() {
this.inputempty();
},
autoplay_func: "line"
},
Cell: {
noLP: function(dir) {
return this.isEmpty();
}
},
Border: {
enableLineNG: true
},
Board: {
hasborder: 1
},
LineGraph: {
enabled: true
},
Graphic: {
irowake: true,
numbercolor_func: "qnum",
gridcolor_type: "SLIGHT",
paint: function() {
this.drawDashedGrid();
this.drawBGCells();
this.drawBorders();
this.drawLines();
this.drawPekes();
this.drawChassis();
},
getBGCellColor: function(cell) {
return cell.ques === 7 ? "black" : this.getBGCellColor_error1(cell);
}
},
Encode: {
decodePzpr: function(type) {
this.decodeEmpty();
},
encodePzpr: function(type) {
this.encodeEmpty();
}
},
FileIO: {
decodeData: function() {
this.decodeEmpty();
this.decodeBorderLine();
},
encodeData: function() {
this.encodeEmpty();
this.encodeBorderLine();
},
decodeEmpty: function() {
this.decodeCell(function(cell, ca) {
if (ca === "*") {
cell.ques = 7;
}
});
},
encodeEmpty: function() {
this.encodeCell(function(cell) {
return cell.ques === 7 ? "* " : ". ";
});
}
},
AnsCheck: {
checklist: [
"checkBranchLine",
"checkCrossLine",
"checkDeadendLine+",
"checkOneLoop",
"checkNoLine"
]
}
});