]>
Commit | Line | Data |
---|---|---|
1 | public enum TileDesign: CaseIterable { | |
2 | case grid | |
3 | case dottedGrid | |
4 | case stitch | |
5 | case curvedTile | |
6 | case brick | |
7 | case tile | |
8 | case shadowGrid | |
9 | case circles | |
10 | case trees | |
11 | case shingles | |
12 | case wicker | |
13 | case rhombus | |
14 | case balls | |
15 | ||
16 | func pixels() -> [UInt8] { | |
17 | switch self { | |
18 | case .grid: | |
19 | return [ | |
20 | 1, 0, 1, 0, 1, 0, 1, 0, | |
21 | 0, 1, 0, 1, 0, 1, 0, 1, | |
22 | 1, 0, 1, 0, 1, 0, 1, 0, | |
23 | 0, 1, 0, 1, 0, 1, 0, 1, | |
24 | 1, 0, 1, 0, 1, 0, 1, 0, | |
25 | 0, 1, 0, 1, 0, 1, 0, 1, | |
26 | 1, 0, 1, 0, 1, 0, 1, 0, | |
27 | 0, 1, 0, 1, 0, 1, 0, 1 | |
28 | ] | |
29 | case .dottedGrid: | |
30 | return [ | |
31 | 1, 1, 1, 1, 0, 1, 1, 1, | |
32 | 1, 1, 1, 1, 1, 1, 1, 1, | |
33 | 0, 1, 0, 1, 0, 1, 0, 1, | |
34 | 1, 1, 1, 1, 1, 1, 1, 1, | |
35 | 1, 1, 1, 1, 0, 1, 1, 1, | |
36 | 1, 1, 1, 1, 1, 1, 1, 1, | |
37 | 0, 1, 1, 1, 0, 1, 1, 1, | |
38 | 1, 1, 1, 1, 1, 1, 1, 1, | |
39 | ] | |
40 | case .stitch: | |
41 | return [ | |
42 | 1, 1, 1, 1, 1, 1, 1, 1, | |
43 | 1, 1, 1, 1, 1, 1, 1, 1, | |
44 | 1, 0, 1, 1, 1, 1, 1, 1, | |
45 | 0, 1, 0, 1, 1, 1, 1, 1, | |
46 | 1, 1, 1, 1, 1, 1, 1, 1, | |
47 | 1, 1, 1, 1, 1, 1, 1, 1, | |
48 | 1, 1, 1, 1, 1, 0, 1, 1, | |
49 | 1, 1, 1, 1, 0, 1, 0, 1, | |
50 | ] | |
51 | case .curvedTile: | |
52 | return [ | |
53 | 1, 1, 1, 1, 1, 1, 1, 0, | |
54 | 1, 1, 1, 1, 1, 1, 0, 0, | |
55 | 0, 1, 1, 1, 1, 0, 1, 1, | |
56 | 1, 0, 1, 1, 0, 1, 1, 1, | |
57 | 1, 1, 0, 0, 1, 1, 1, 1, | |
58 | 1, 1, 1, 1, 0, 0, 1, 1, | |
59 | 1, 1, 1, 1, 1, 1, 0, 1, | |
60 | 1, 1, 1, 1, 1, 1, 1, 0, | |
61 | ] | |
62 | case .brick: | |
63 | return [ | |
64 | 0, 1, 1, 1, 1, 1, 1, 1, | |
65 | 0, 0, 0, 0, 0, 0, 0, 0, | |
66 | 1, 1, 1, 1, 0, 1, 1, 1, | |
67 | 1, 1, 1, 1, 0, 1, 1, 1, | |
68 | 1, 1, 1, 1, 0, 1, 1, 1, | |
69 | 0, 0, 0, 0, 0, 0, 0, 0, | |
70 | 0, 1, 1, 1, 1, 1, 1, 1, | |
71 | 0, 1, 1, 1, 1, 1, 1, 1, | |
72 | ] | |
73 | case .tile: | |
74 | return [ | |
75 | 1, 1, 1, 1, 1, 0, 1, 1, | |
76 | 1, 1, 1, 1, 0, 1, 1, 1, | |
77 | 1, 1, 1, 0, 0, 0, 1, 1, | |
78 | 1, 1, 0, 1, 1, 1, 0, 1, | |
79 | 0, 0, 1, 1, 1, 1, 1, 0, | |
80 | 0, 1, 1, 1, 1, 1, 1, 1, | |
81 | 1, 1, 1, 1, 1, 1, 1, 0, | |
82 | 1, 1, 1, 1, 1, 1, 0, 1, | |
83 | ] | |
84 | case .shadowGrid: | |
85 | return [ | |
86 | 1, 1, 1, 1, 0, 1, 0, 0, | |
87 | 0, 0, 0, 0, 0, 1, 0, 0, | |
88 | 1, 1, 1, 1, 1, 1, 1, 1, | |
89 | 0, 0, 0, 0, 0, 1, 0, 0, | |
90 | 0, 0, 0, 0, 0, 1, 0, 0, | |
91 | 1, 1, 1, 1, 0, 1, 0, 0, | |
92 | 1, 1, 1, 1, 0, 1, 0, 0, | |
93 | 1, 1, 1, 1, 0, 1, 0, 0, | |
94 | ] | |
95 | case .circles: | |
96 | return [ | |
97 | 1, 1, 1, 1, 1, 1, 1, 0, | |
98 | 0, 1, 1, 1, 1, 1, 0, 1, | |
99 | 1, 0, 1, 1, 1, 0, 1, 1, | |
100 | 1, 1, 0, 0, 0, 1, 1, 0, | |
101 | 1, 0, 1, 1, 1, 0, 1, 1, | |
102 | 0, 1, 1, 1, 1, 1, 0, 1, | |
103 | 1, 1, 1, 1, 1, 1, 1, 0, | |
104 | 1, 1, 1, 1, 1, 1, 1, 0, | |
105 | ] | |
106 | case .trees: | |
107 | return [ | |
108 | 1, 0, 1, 0, 1, 0, 1, 0, | |
109 | 0, 1, 1, 1, 1, 1, 0, 1, | |
110 | 1, 1, 1, 1, 1, 1, 1, 0, | |
111 | 1, 1, 1, 1, 1, 1, 1, 0, | |
112 | 1, 0, 1, 0, 1, 0, 1, 0, | |
113 | 1, 1, 0, 1, 0, 1, 1, 1, | |
114 | 1, 1, 1, 0, 1, 1, 1, 1, | |
115 | 1, 1, 1, 0, 1, 1, 1, 1, | |
116 | ] | |
117 | case .shingles: | |
118 | return [ | |
119 | 1, 1, 1, 1, 0, 1, 1, 1, | |
120 | 1, 1, 1, 1, 0, 1, 1, 1, | |
121 | 1, 1, 1, 0, 1, 0, 1, 1, | |
122 | 0, 0, 0, 1, 1, 1, 0, 0, | |
123 | 0, 1, 1, 1, 1, 1, 1, 1, | |
124 | 0, 1, 1, 1, 1, 1, 1, 1, | |
125 | 1, 0, 1, 1, 1, 1, 1, 0, | |
126 | 1, 1, 0, 0, 0, 0, 0, 1 | |
127 | ] | |
128 | case .wicker: | |
129 | return [ | |
130 | 0, 0, 0, 0, 0, 1, 1, 1, | |
131 | 1, 0, 0, 0, 1, 0, 1, 1, | |
132 | 1, 1, 0, 1, 1, 1, 0, 1, | |
133 | 1, 0, 1, 1, 1, 0, 0, 0, | |
134 | 0, 1, 1, 1, 0, 0, 0, 0, | |
135 | 1, 1, 1, 0, 1, 0, 0, 0, | |
136 | 1, 1, 0, 1, 1, 1, 0, 1, | |
137 | 1, 0, 0, 0, 1, 1, 1, 0 | |
138 | ] | |
139 | case .rhombus: | |
140 | return [ | |
141 | 1, 1, 1, 1, 1, 1, 1, 1, | |
142 | 0, 1, 1, 1, 1, 1, 1, 1, | |
143 | 1, 0, 1, 1, 1, 1, 1, 0, | |
144 | 0, 1, 0, 1, 1, 1, 0, 1, | |
145 | 1, 0, 1, 0, 1, 0, 1, 0, | |
146 | 0, 1, 0, 1, 1, 1, 0, 1, | |
147 | 1, 0, 1, 1, 1, 1, 1, 0, | |
148 | 0, 1, 1, 1, 1, 1, 1, 1 | |
149 | ] | |
150 | case .balls: | |
151 | return [ | |
152 | 1, 0, 0, 0, 1, 0, 0, 0, | |
153 | 0, 1, 1, 1, 0, 1, 1, 0, | |
154 | 0, 1, 1, 1, 0, 0, 0, 0, | |
155 | 0, 1, 1, 1, 0, 0, 0, 0, | |
156 | 1, 0, 0, 0, 1, 0, 0, 0, | |
157 | 0, 1, 1, 0, 0, 1, 1, 1, | |
158 | 0, 0, 0, 0, 0, 1, 1, 1, | |
159 | 0, 0, 0, 0, 0, 1, 1, 1 | |
160 | ] | |
161 | } | |
162 | } | |
163 | } |