-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlevels.js
More file actions
82 lines (73 loc) · 5.88 KB
/
levels.js
File metadata and controls
82 lines (73 loc) · 5.88 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
var colours = ["red", "blue", "green", "yellow"];
var blocks = {
rowHeight: 15,
unitWidth: 20,
heightOffset: 50
}
var currentLevel = 1;
var levels = [];
// abstract array of arrays to code for blocks
// each inner array codes for a complete row of blocks.
// A string of 1s, 2s etc. represents a complete block,
// which will be coloured according to its number
levels[0] = {blocks: [
[1,1,1,1,9,9,9,9,1,1,1,1,9,9,9,9,1,1,1,1,9,9,9,9,1,1,1,1,9,9,9,9,1,1,1,1,9,9,9,9,1,1,1,1,9,9,9,9,1,1],
[3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3],
[1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1],
[3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,9,9,9,9,3,3,3,3,9,9,9,9,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3],
[1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1,1,1,2,2,2,2,1,1],
[3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,4,4,4,3,3,3,3,4,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