diff options
Diffstat (limited to 'ext/wittle_generator/PuzzlesetEasy.cpp')
-rw-r--r-- | ext/wittle_generator/PuzzlesetEasy.cpp | 379 |
1 files changed, 379 insertions, 0 deletions
diff --git a/ext/wittle_generator/PuzzlesetEasy.cpp b/ext/wittle_generator/PuzzlesetEasy.cpp new file mode 100644 index 0000000..4e2f84f --- /dev/null +++ b/ext/wittle_generator/PuzzlesetEasy.cpp | |||
@@ -0,0 +1,379 @@ | |||
1 | #include "PuzzlesetEasy.h" | ||
2 | |||
3 | #include "Generate.h" | ||
4 | |||
5 | const std::vector<std::function<void(Generate&)>>& GetEasyPuzzles() { | ||
6 | static std::vector<std::function<void(Generate&)>> generator_fns{ | ||
7 | [](Generate& generator) { | ||
8 | generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2); | ||
9 | generator.setSymbol(Decoration::Exit, 4 * 2, 0); | ||
10 | generator.generate( | ||
11 | 4, 4, {{{Decoration::Dot_Intersection, 25}, {Decoration::Gap, 2}}}); | ||
12 | }, | ||
13 | [](Generate& generator) { | ||
14 | generator.setSymbol(Decoration::Start, 0, 4 * 2); | ||
15 | generator.generate(4, 4, | ||
16 | {{{Decoration::Stone | Decoration::Color::Black, 7}, | ||
17 | {Decoration::Stone | Decoration::Color::White, 5}, | ||
18 | {Decoration::Exit, 1}}}); | ||
19 | }, | ||
20 | [](Generate& generator) { | ||
21 | generator.setFlag(Generate::RegularStartEnd); | ||
22 | generator.setSymmetry(Panel::Rotational); | ||
23 | generator.generate(6, 6, {{{Decoration::Gap, 15}}}); | ||
24 | }, | ||
25 | [](Generate& generator) { | ||
26 | generator.setFlag(Generate::RegularStartEnd); | ||
27 | generator.setSymmetry(Panel::Vertical); | ||
28 | generator.generate(5, 8, {{{Decoration::Gap, 15}}}); | ||
29 | }, | ||
30 | [](Generate& generator) { | ||
31 | generator.setFlag(Generate::RegularStartEnd); | ||
32 | generator.setSymmetry(Panel::Horizontal); | ||
33 | generator.generate(5, 5, {{{Decoration::Dot, 7}}}); | ||
34 | }, | ||
35 | [](Generate& generator) { | ||
36 | generator.setFlag(Generate::RegularStartEnd); | ||
37 | generator.setSymmetry(Panel::Rotational); | ||
38 | generator.generate(5, 5, {{{Decoration::Dot, 6}}}); | ||
39 | }, | ||
40 | [](Generate& generator) { | ||
41 | generator.setFlag(Generate::RegularStartEnd); | ||
42 | generator.setSymmetry(Panel::Rotational); | ||
43 | generator.generate(5, 5, | ||
44 | {{{Decoration::Dot | Decoration::Color::Blue, 1}, | ||
45 | {Decoration::Dot | Decoration::Color::Yellow, 2}, | ||
46 | {Decoration::Dot, 4}}}); | ||
47 | }, | ||
48 | [](Generate& generator) { | ||
49 | generator.setFlag(Generate::RegularStartEnd); | ||
50 | generator.generate( | ||
51 | 4, 4, {{{Decoration::Poly | Decoration::Color::Yellow, 2}}}); | ||
52 | }, | ||
53 | [](Generate& generator) { | ||
54 | generator.setFlag(Generate::FullGaps); | ||
55 | generator.setFlag(Generate::StartEdgeOnly); | ||
56 | generator.generate(5, 5, | ||
57 | {{{Decoration::Gap, 16}, | ||
58 | {Decoration::Dot, 10}, | ||
59 | {Decoration::Exit, 1}, | ||
60 | {Decoration::Start, 1}}}); | ||
61 | }, | ||
62 | [](Generate& generator) { | ||
63 | generator.setFlag(Generate::RegularStartEnd); | ||
64 | generator.generate(3, 3, | ||
65 | {{{Decoration::Eraser | Decoration::Color::Green, 1}, | ||
66 | {Decoration::Dot, 8}}}); | ||
67 | }, | ||
68 | [](Generate& generator) { | ||
69 | generator.setFlag(Generate::RegularStartEnd); | ||
70 | generator.generate( | ||
71 | 4, 4, | ||
72 | {{{Decoration::Stone | Decoration::Color::White, 8}, | ||
73 | {Decoration::Stone | Decoration::Color::Black, 4}, | ||
74 | {Decoration::Eraser | Decoration::Color::Green, 1}}}); | ||
75 | }, | ||
76 | [](Generate& generator) { | ||
77 | generator.setFlag(Generate::RegularStartEnd); | ||
78 | generator.generate( | ||
79 | 4, 4, | ||
80 | {{{Decoration::Stone | Decoration::Color::Red, 4}, | ||
81 | {Decoration::Stone | Decoration::Color::White, 4}, | ||
82 | {Decoration::Stone | Decoration::Color::Black, 3}, | ||
83 | {Decoration::Eraser | Decoration::Color::Green, 1}}}); | ||
84 | }, | ||
85 | [](Generate& generator) { | ||
86 | generator.setFlag(Generate::RegularStartEnd); | ||
87 | generator.setFlag(Generate::RequireCombineShapes); | ||
88 | generator.generate(4, 4, | ||
89 | {{{Decoration::Poly | Decoration::Color::Yellow, 1}, | ||
90 | {Decoration::Poly | Decoration::Color::Yellow | | ||
91 | Decoration::Can_Rotate, | ||
92 | 1}, | ||
93 | {Decoration::Gap, 5}}}); | ||
94 | }, | ||
95 | [](Generate& generator) { | ||
96 | generator.setFlag(Generate::RegularStartEnd); | ||
97 | generator.generate( | ||
98 | 3, 3, | ||
99 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
100 | {Decoration::Eraser | Decoration::Color::White, 1}}}); | ||
101 | }, | ||
102 | [](Generate& generator) { | ||
103 | generator.setFlag(Generate::FullGaps); | ||
104 | generator.generate(4, 4, | ||
105 | {{{Decoration::Gap, 8}, | ||
106 | {Decoration::Dot_Intersection, 10}, | ||
107 | {Decoration::Exit, 1}, | ||
108 | {Decoration::Start, 3}}}); | ||
109 | }, | ||
110 | [](Generate& generator) { | ||
111 | generator.generate(5, 5, | ||
112 | {{{Decoration::Exit, 1}, | ||
113 | {Decoration::Stone | Decoration::Color::Black, 11}, | ||
114 | {Decoration::Stone | Decoration::Color::White, 8}, | ||
115 | {Decoration::Start, 3}}}); | ||
116 | }, | ||
117 | [](Generate& generator) { | ||
118 | generator.setFlag(Generate::RegularStartEnd); | ||
119 | generator.generate(4, 4, | ||
120 | {{{Decoration::Star | Decoration::Color::Green, 6}, | ||
121 | {Decoration::Star | Decoration::Color::Orange, 5}, | ||
122 | {Decoration::Eraser | Decoration::Orange, 1}}}); | ||
123 | }, | ||
124 | [](Generate& generator) { | ||
125 | generator.setFlag(Generate::RegularStartEnd); | ||
126 | generator.generate(4, 4, | ||
127 | {{{Decoration::Star | Decoration::Color::Orange, 6}, | ||
128 | {Decoration::Star | Decoration::Color::Magenta, 5}, | ||
129 | {Decoration::Star | Decoration::Color::Green, 4}, | ||
130 | {Decoration::Eraser | Decoration::Magenta, 1}}}); | ||
131 | }, | ||
132 | [](Generate& generator) { | ||
133 | generator.setFlag(Generate::RegularStartEnd); | ||
134 | generator.generate(4, 4, | ||
135 | {{{Decoration::Star | Decoration::Color::Magenta, 6}, | ||
136 | {Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
137 | {Decoration::Eraser | Decoration::White, 1}}}); | ||
138 | }, | ||
139 | [](Generate& generator) { | ||
140 | generator.setFlag(Generate::RegularStartEnd); | ||
141 | generator.generate(4, 4, | ||
142 | {{{Decoration::Star | Decoration::Color::Magenta, 5}, | ||
143 | {Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
144 | {Decoration::Eraser | Decoration::White, 1}}}); | ||
145 | }, | ||
146 | [](Generate& generator) { | ||
147 | generator.setFlag(Generate::TreehouseLayout); | ||
148 | generator.generate(4, 4, | ||
149 | {{{Decoration::Star | Decoration::Color::Orange, 4}, | ||
150 | {Decoration::Gap, 10}}}); | ||
151 | }, | ||
152 | [](Generate& generator) { | ||
153 | generator.setFlag(Generate::RegularStartEnd); | ||
154 | generator.generate(5, 5, | ||
155 | {{{Decoration::Star | Decoration::Color::Orange, 10}, | ||
156 | {Decoration::Gap, 3}}}); | ||
157 | }, | ||
158 | [](Generate& generator) { | ||
159 | generator.setFlag(Generate::TreehouseLayout); | ||
160 | generator.generate(4, 4, | ||
161 | {{{Decoration::Star | Decoration::Color::Orange, 4}, | ||
162 | {Decoration::Star | Decoration::Color::Magenta, 4}, | ||
163 | {Decoration::Gap, 8}}}); | ||
164 | }, | ||
165 | [](Generate& generator) { | ||
166 | generator.setFlag(Generate::TreehouseLayout); | ||
167 | generator.generate(4, 4, | ||
168 | {{{Decoration::Star | Decoration::Color::Orange, 4}, | ||
169 | {Decoration::Star | Decoration::Color::Magenta, 2}, | ||
170 | {Decoration::Star | Decoration::Color::Green, 2}, | ||
171 | {Decoration::Gap, 8}}}); | ||
172 | }, | ||
173 | [](Generate& generator) { | ||
174 | generator.setFlag(Generate::TreehouseLayout); | ||
175 | generator.generate( | ||
176 | 4, 3, | ||
177 | {{{Decoration::Star | Decoration::Color::Orange, 6}, | ||
178 | {Decoration::Star | Decoration::Color::Magenta, 4}, | ||
179 | {Decoration::Star | Decoration::Color::Green, 2}}}); | ||
180 | }, | ||
181 | [](Generate& generator) { | ||
182 | generator.setFlag(Generate::TreehouseLayout); | ||
183 | generator.setFlag(Generate::FullGaps); | ||
184 | generator.generate(4, 4, | ||
185 | {{{Decoration::Star | Decoration::Color::Magenta, 6}, | ||
186 | {Decoration::Dot_Intersection, 6}, | ||
187 | {Decoration::Gap, 3}}}); | ||
188 | }, | ||
189 | [](Generate& generator) { | ||
190 | generator.setFlag(Generate::TreehouseLayout); | ||
191 | generator.generate( | ||
192 | 4, 4, | ||
193 | {{{Decoration::Star | Decoration::Color::Magenta, 4}, | ||
194 | {Decoration::Stone | Decoration::Color::Black, 4}, | ||
195 | {Decoration::Stone | Decoration::Color::White, 4}}}); | ||
196 | }, | ||
197 | [](Generate& generator) { | ||
198 | generator.setFlag(Generate::TreehouseLayout); | ||
199 | generator.generate( | ||
200 | 3, 3, | ||
201 | {{{Decoration::Star | Decoration::Color::Black, 1}, | ||
202 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
203 | {Decoration::Stone | Decoration::Color::White, 2}}}); | ||
204 | }, | ||
205 | [](Generate& generator) { | ||
206 | generator.setFlag(Generate::TreehouseLayout); | ||
207 | generator.generate( | ||
208 | 4, 4, | ||
209 | {{{Decoration::Star | Decoration::Color::White, 2}, | ||
210 | {Decoration::Stone | Decoration::Color::Black, 2}, | ||
211 | {Decoration::Stone | Decoration::Color::White, 2}, | ||
212 | {Decoration::Stone | Decoration::Color::Purple, 2}}}); | ||
213 | }, | ||
214 | [](Generate& generator) { | ||
215 | generator.setFlag(Generate::TreehouseLayout); | ||
216 | generator.generate( | ||
217 | 4, 4, | ||
218 | {{{Decoration::Poly | Decoration::Color::Orange, 2}, | ||
219 | {Decoration::Star | Decoration::Color::Magenta, 4}}}); | ||
220 | }, | ||
221 | [](Generate& generator) { | ||
222 | generator.setFlag(Generate::TreehouseLayout); | ||
223 | generator.generate( | ||
224 | 4, 5, | ||
225 | {{{Decoration::Stone | Decoration::Color::White, 8}, | ||
226 | {Decoration::Stone | Decoration::Color::Black, 8}, | ||
227 | {Decoration::Eraser | Decoration::Color::White, 2}}}); | ||
228 | }, | ||
229 | [](Generate& generator) { | ||
230 | generator.setFlag(Generate::TreehouseLayout); | ||
231 | generator.generate(4, 5, | ||
232 | {{{Decoration::Poly | Decoration::Color::Orange, 2}, | ||
233 | {Decoration::Stone | Decoration::Color::White, 4}, | ||
234 | {Decoration::Stone | Decoration::Color::Black, 4}, | ||
235 | {Decoration::Gap, 4}}}); | ||
236 | }, | ||
237 | [](Generate& generator) { | ||
238 | generator.setFlag(Generate::RegularStartEnd); | ||
239 | generator.generate( | ||
240 | 4, 4, | ||
241 | {{{Decoration::Dot_Intersection, 25}, | ||
242 | {Decoration::Poly | Decoration::Color::Yellow, 2}}}); | ||
243 | }, | ||
244 | [](Generate& generator) { | ||
245 | generator.setFlag(Generate::RegularStartEnd); | ||
246 | generator.generate( | ||
247 | 4, 4, | ||
248 | {{{Decoration::Dot_Intersection, 25}, | ||
249 | {Decoration::Poly | Decoration::Color::Yellow | | ||
250 | Decoration::Can_Rotate, | ||
251 | 2}, | ||
252 | {Decoration::Eraser | Decoration::Color::White, 1}}}); | ||
253 | }, | ||
254 | [](Generate& generator) { | ||
255 | generator.setFlag(Generate::RegularStartEnd); | ||
256 | generator.setSymmetry(Panel::Rotational); | ||
257 | generator.generate( | ||
258 | 5, 5, | ||
259 | {{{Decoration::Stone | Decoration::Color::Black, 6}, | ||
260 | {Decoration::Stone | Decoration::Color::White, 6}}}); | ||
261 | }, | ||
262 | [](Generate& generator) { | ||
263 | generator.setFlag(Generate::RegularStartEnd); | ||
264 | generator.setSymmetry(Panel::Rotational); | ||
265 | generator.generate(5, 5, | ||
266 | {{{Decoration::Stone | Decoration::Color::Black, 5}, | ||
267 | {Decoration::Stone | Decoration::Color::White, 5}, | ||
268 | {Decoration::Dot, 3}}}); | ||
269 | }, | ||
270 | [](Generate& generator) { | ||
271 | generator.setFlag(Generate::RegularStartEnd); | ||
272 | generator.setFlag(Generate::SplitShapes); | ||
273 | generator.generate(4, 4, | ||
274 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
275 | {Decoration::Gap, 8}}}); | ||
276 | }, | ||
277 | [](Generate& generator) { | ||
278 | generator.setFlag(Generate::RegularStartEnd); | ||
279 | generator.setFlag(Generate::BigShapes); | ||
280 | generator.generate(5, 5, | ||
281 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
282 | {Decoration::Gap, 12}}}); | ||
283 | }, | ||
284 | [](Generate& generator) { | ||
285 | generator.setFlag(Generate::RegularStartEnd); | ||
286 | generator.setFlag(Generate::DisconnectShapes); | ||
287 | generator.generate( | ||
288 | 3, 3, {{{Decoration::Poly | Decoration::Color::Yellow, 2}}}); | ||
289 | }, | ||
290 | [](Generate& generator) { | ||
291 | generator.setFlag(Generate::RegularStartEnd); | ||
292 | generator.setFlag(Generate::DisconnectShapes); | ||
293 | generator.setFlag(Generate::BigShapes); | ||
294 | generator.generate( | ||
295 | 4, 4, {{{Decoration::Poly | Decoration::Color::Yellow, 2}}}); | ||
296 | }, | ||
297 | [](Generate& generator) { | ||
298 | generator.setFlag(Generate::RegularStartEnd); | ||
299 | generator.setFlag(Generate::RequireCombineShapes); | ||
300 | generator.setFlag(Generate::DisableCancelShapes); | ||
301 | generator.generate(3, 3, | ||
302 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
303 | {Decoration::Poly | Decoration::Negative | | ||
304 | Decoration::Color::Blue, | ||
305 | 1}}}); | ||
306 | }, | ||
307 | [](Generate& generator) { | ||
308 | generator.setFlag(Generate::RegularStartEnd); | ||
309 | generator.setFlag(Generate::RequireCombineShapes); | ||
310 | generator.setFlag(Generate::DisableCancelShapes); | ||
311 | generator.generate(4, 4, | ||
312 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
313 | {Decoration::Poly | Decoration::Negative | | ||
314 | Decoration::Color::Blue, | ||
315 | 1}}}); | ||
316 | }, | ||
317 | [](Generate& generator) { | ||
318 | generator.setFlag(Generate::RegularStartEnd); | ||
319 | generator.setFlag(Generate::BigShapes); | ||
320 | generator.setFlag(Generate::DisableCancelShapes); | ||
321 | generator.generate(4, 4, | ||
322 | {{{Decoration::Poly | Decoration::Color::Yellow, 2}, | ||
323 | {Decoration::Poly | Decoration::Negative | | ||
324 | Decoration::Color::Blue, | ||
325 | 1}}}); | ||
326 | }, | ||
327 | [](Generate& generator) { | ||
328 | generator.setFlag(Generate::RegularStartEnd); | ||
329 | generator.setFlag(Generate::RequireCancelShapes); | ||
330 | generator.generate(4, 4, | ||
331 | {{{Decoration::Poly | Decoration::Color::Yellow, 3}, | ||
332 | {Decoration::Poly | Decoration::Negative | | ||
333 | Decoration::Color::Blue, | ||
334 | 2}}}); | ||
335 | }, | ||
336 | [](Generate& generator) { | ||
337 | generator.setFlag(Generate::RegularStartEnd); | ||
338 | generator.generate( | ||
339 | 4, 4, {{{Decoration::Triangle | Decoration::Color::Orange, 6}}}); | ||
340 | }, | ||
341 | [](Generate& generator) { | ||
342 | generator.setFlag(Generate::TreehouseLayout); | ||
343 | generator.setFlag(Generate::LongPath); | ||
344 | generator.generate( | ||
345 | 5, 4, | ||
346 | {{{Decoration::Star | Decoration::Color::Magenta, 6}, | ||
347 | {Decoration::Stone | Decoration::Color::Orange, 4}, | ||
348 | {Decoration::Stone | Decoration::Color::Green, 4}}}); | ||
349 | }, | ||
350 | [](Generate& generator) { | ||
351 | generator.setFlag(Generate::RegularStartEnd); | ||
352 | generator.generate( | ||
353 | 4, 4, | ||
354 | {{{Decoration::Dot, 6}, | ||
355 | {Decoration::Stone | Decoration::Color::Black, 3}, | ||
356 | {Decoration::Stone | Decoration::Color::White, 3}}}); | ||
357 | }, | ||
358 | [](Generate& generator) { | ||
359 | generator.setFlag(Generate::RegularStartEnd); | ||
360 | generator.generate( | ||
361 | 4, 4, | ||
362 | {{{Decoration::Dot, 4}, | ||
363 | {Decoration::Stone | Decoration::Color::Black, 3}, | ||
364 | {Decoration::Stone | Decoration::Color::White, 2}, | ||
365 | {Decoration::Poly | Decoration::Color::Yellow, 1}}}); | ||
366 | }, | ||
367 | [](Generate& generator) { | ||
368 | generator.setSymmetry(Panel::Rotational); | ||
369 | generator.generate(5, 5, | ||
370 | {{{Decoration::Dot | Decoration::Color::Blue, 2}, | ||
371 | {Decoration::Dot | Decoration::Color::Yellow, 2}, | ||
372 | {Decoration::Dot, 4}, | ||
373 | {Decoration::Start, 2}, | ||
374 | {Decoration::Exit, 1}}}); | ||
375 | }, | ||
376 | }; | ||
377 | |||
378 | return generator_fns; | ||
379 | } | ||