about summary refs log tree commit diff stats
path: root/ext/wittle_generator/PuzzlesetHard.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wittle_generator/PuzzlesetHard.cpp')
-rw-r--r--ext/wittle_generator/PuzzlesetHard.cpp933
1 files changed, 933 insertions, 0 deletions
diff --git a/ext/wittle_generator/PuzzlesetHard.cpp b/ext/wittle_generator/PuzzlesetHard.cpp new file mode 100644 index 0000000..c775d64 --- /dev/null +++ b/ext/wittle_generator/PuzzlesetHard.cpp
@@ -0,0 +1,933 @@
1#include "PuzzlesetHard.h"
2
3#include "Generate.h"
4
5namespace {
6
7void MakeSecretSymmetryGrid(Generate& generator) {
8 for (int x : {0, 6, 8, 14}) {
9 for (int y : {0, 6, 8, 14}) {
10 generator.setSymbol(Decoration::Start, x, y);
11 }
12 }
13 for (int x : {0, 14}) {
14 for (int y : {2, 4, 10, 12}) {
15 generator.setSymbol(Decoration::Exit, x, y);
16 generator.setSymbol(Decoration::Exit, y, x);
17 }
18 }
19}
20
21} // namespace
22
23const std::vector<std::function<void(Generate&)>>& GetHardPuzzles() {
24 static std::vector<std::function<void(Generate&)>> generator_fns{
25 [](Generate& generator) {
26 generator.setFlag(Generate::StartEdgeOnly);
27 generator.setSymmetry(Panel::Rotational);
28 generator.generate(
29 6, 6,
30 {{{Decoration::Triangle | Decoration::Color::Orange, 12},
31 {Decoration::Start, 1},
32 {Decoration::Exit, 1}}});
33 },
34 [](Generate& generator) {
35 generator.setFlag(Generate::StartEdgeOnly);
36 generator.setFlag(Generate::WriteInvisible);
37 generator.setSymmetry(Panel::Rotational);
38 generator.generate(7, 7,
39 {{{Decoration::Dot | Decoration::Color::Blue, 4},
40 {Decoration::Dot | Decoration::Color::Yellow, 4},
41 {Decoration::Dot, 7},
42 {Decoration::Start, 1},
43 {Decoration::Exit, 1}}});
44 },
45 [](Generate& generator) {
46 generator.setFlag(Generate::StartEdgeOnly);
47 generator.setFlag(Generate::WriteInvisible);
48 generator.setSymmetry(Panel::Rotational);
49 generator.generate(7, 7,
50 {{{Decoration::Stone | Decoration::Color::Black, 6},
51 {Decoration::Stone | Decoration::Color::White, 6},
52 {Decoration::Start, 1},
53 {Decoration::Exit, 1}}});
54 },
55 [](Generate& generator) {
56 generator.setFlag(Generate::StartEdgeOnly);
57 generator.setFlag(Generate::WriteInvisible);
58 generator.setSymmetry(Panel::Rotational);
59 generator.generate(7, 7,
60 {{{Decoration::Star | Decoration::Color::Orange, 6},
61 {Decoration::Star | Decoration::Color::Green, 6},
62 {Decoration::Start, 1},
63 {Decoration::Exit, 1}}});
64 },
65 [](Generate& generator) {
66 generator.setFlag(Generate::StartEdgeOnly);
67 generator.setFlag(Generate::WriteInvisible);
68 generator.setFlag(Generate::RequireCombineShapes);
69 generator.setSymmetry(Panel::Rotational);
70 generator.generate(5, 5,
71 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
72 {Decoration::Start, 1},
73 {Decoration::Exit, 1}}});
74 },
75 [](Generate& generator) {
76 generator.setFlag(Generate::StartEdgeOnly);
77 generator.setFlag(Generate::WriteInvisible);
78 generator.setSymmetry(Panel::Rotational);
79 generator.generate(
80 7, 7,
81 {{{Decoration::Dot | Decoration::Color::Blue, 2},
82 {Decoration::Dot | Decoration::Color::Yellow, 2},
83 {Decoration::Dot, 8},
84 {Decoration::Eraser | Decoration::Color::Purple, 1},
85 {Decoration::Start, 1},
86 {Decoration::Exit, 1}}});
87 },
88 [](Generate& generator) {
89 generator.setSymbol(Decoration::Exit, 0, 0);
90 generator.setSymbol(Decoration::Exit, 0, 4 * 4);
91 generator.setSymbol(Decoration::Exit, 4 * 4, 0);
92 generator.setSymbol(Decoration::Exit, 4 * 4, 4 * 4);
93 generator.generate(8, 8,
94 {{{Decoration::Stone | Decoration::Color::White, 10},
95 {Decoration::Stone | Decoration::Color::Black, 10},
96 {Decoration::Dot_Intersection, 81},
97 {Decoration::Start, 8}}});
98 },
99 [](Generate& generator) {
100 generator.setFlag(Generate::RegularStartEnd);
101 generator.generate(
102 6, 6,
103 {{{Decoration::Dot_Intersection, 49},
104 {Decoration::Poly | Decoration::Color::Orange, 1},
105 {Decoration::Poly | Decoration::Color::Blue, 1},
106 {Decoration::Poly | Decoration::Negative |
107 Decoration::Color::Blue,
108 2},
109 {Decoration::Poly | Decoration::Negative |
110 Decoration::Color::Orange,
111 1},
112 {Decoration::Star | Decoration::Color::Orange, 4},
113 {Decoration::Star | Decoration::Color::Blue, 3},
114 {Decoration::Triangle | Decoration::Color::Orange, 2},
115 {Decoration::Triangle | Decoration::Color::Blue, 1},
116 {Decoration::Stone | Decoration::Color::Orange, 1},
117 {Decoration::Stone | Decoration::Color::Blue, 2},
118 {Decoration::Eraser | Decoration::Color::White, 1}}});
119 },
120 [](Generate& generator) {
121 generator.setFlag(Generate::RegularStartEnd);
122 generator.setSymmetry(Panel::Rotational);
123 generator.generate(
124 7, 7, {{{Decoration::Poly | Decoration::Color::Yellow, 5}}});
125 },
126 [](Generate& generator) {
127 generator.setFlag(Generate::RegularStartEnd);
128 generator.generate(
129 5, 5,
130 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
131 {Decoration::Poly | Decoration::Color::Yellow |
132 Decoration::Can_Rotate,
133 1},
134 {Decoration::Stone | Decoration::Color::Black, 5},
135 {Decoration::Stone | Decoration::Color::White, 3}}});
136 },
137 [](Generate& generator) {
138 generator.setFlag(Generate::RegularStartEnd);
139 generator.setFlag(Generate::BigShapes);
140 generator.generate(
141 5, 5,
142 {{{Decoration::Poly | Decoration::Color::Yellow |
143 Decoration::Can_Rotate,
144 2},
145 {Decoration::Triangle | Decoration::Color::Orange, 3},
146 {Decoration::Stone | Decoration::Color::Black, 3},
147 {Decoration::Stone | Decoration::Color::White, 3}}});
148 },
149 [](Generate& generator) {
150 generator.setFlag(Generate::StartEdgeOnly);
151 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
152 generator.generate(5, 5,
153 {{{Decoration::Dot_Intersection, 36},
154 {Decoration::Poly | Decoration::Color::Yellow, 3},
155 {Decoration::Start, 1}}});
156 },
157 [](Generate& generator) {
158 generator.setFlag(Generate::RegularStartEnd);
159 generator.setFlag(Generate::BigShapes);
160 generator.setFlag(Generate::RequireCancelShapes);
161 generator.generate(5, 5,
162 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
163 {Decoration::Poly | Decoration::Negative |
164 Decoration::Color::Blue,
165 3}}});
166 },
167 [](Generate& generator) {
168 generator.setFlag(Generate::RegularStartEnd);
169 generator.generate(
170 5, 6,
171 {{{Decoration::Dot_Intersection, 42},
172 {Decoration::Poly | Decoration::Color::Yellow, 2},
173 {Decoration::Poly | Decoration::Color::Yellow |
174 Decoration::Can_Rotate,
175 1},
176 {Decoration::Triangle | Decoration::Color::Orange, 3},
177 {Decoration::Stone | Decoration::Color::Black, 2},
178 {Decoration::Stone | Decoration::Color::White, 2}}});
179 },
180 [](Generate& generator) {
181 generator.setFlag(Generate::RegularStartEnd);
182 generator.generate(
183 5, 5,
184 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
185 {Decoration::Poly | Decoration::Negative |
186 Decoration::Color::Blue,
187 1},
188 {Decoration::Stone | Decoration::Color::Black, 4},
189 {Decoration::Stone | Decoration::Color::White, 3}}});
190 },
191 [](Generate& generator) {
192 generator.setFlag(Generate::RegularStartEnd);
193 generator.generate(
194 5, 5,
195 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
196 {Decoration::Poly | Decoration::Negative |
197 Decoration::Color::Blue,
198 2},
199 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
200 },
201 [](Generate& generator) {
202 generator.setFlag(Generate::RegularStartEnd);
203 generator.generate(
204 5, 5,
205 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
206 {Decoration::Poly | Decoration::Negative |
207 Decoration::Color::Blue,
208 1},
209 {Decoration::Triangle | Decoration::Color::Orange, 3},
210 {Decoration::Stone | Decoration::Color::Black, 2},
211 {Decoration::Stone | Decoration::Color::White, 2}}});
212 },
213 [](Generate& generator) {
214 generator.setFlag(Generate::RegularStartEnd);
215 generator.generate(
216 5, 5,
217 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
218 {Decoration::Poly | Decoration::Negative |
219 Decoration::Color::Blue,
220 2},
221 {Decoration::Triangle | Decoration::Color::Orange, 3},
222 {Decoration::Stone | Decoration::Color::Black, 2},
223 {Decoration::Stone | Decoration::Color::White, 2}}});
224 },
225 [](Generate& generator) {
226 generator.setFlag(Generate::DisconnectShapes);
227 generator.setFlag(Generate::BigShapes);
228 generator.setSymbol(Decoration::Start, 0, 5 * 2);
229 generator.setSymbol(Decoration::Exit, 0, 0);
230 generator.generate(
231 5, 5,
232 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
233 {Decoration::Poly | Decoration::Negative |
234 Decoration::Color::Blue,
235 1},
236 {Decoration::Triangle | Decoration::Color::Orange, 3},
237 {Decoration::Stone | Decoration::Color::Black, 2},
238 {Decoration::Stone | Decoration::Color::White, 2}}});
239 },
240 [](Generate& generator) {
241 generator.setFlag(Generate::BigShapes);
242 generator.setSymbol(Decoration::Exit, 5 * 2, 0);
243 generator.generate(5, 5,
244 {{{Decoration::Dot_Intersection, 36},
245 {Decoration::Poly | Decoration::Color::Yellow, 2},
246 {Decoration::Poly | Decoration::Negative |
247 Decoration::Color::Blue,
248 1},
249 {Decoration::Start, 1}}});
250 },
251 [](Generate& generator) {
252 generator.setFlag(Generate::BigShapes);
253 generator.setSymbol(Decoration::Exit, 5 * 2, 0);
254 generator.generate(5, 5,
255 {{{Decoration::Dot_Intersection, 36},
256 {Decoration::Poly | Decoration::Color::Yellow, 3},
257 {Decoration::Poly | Decoration::Negative |
258 Decoration::Color::Blue,
259 2},
260 {Decoration::Start, 1}}});
261 },
262 [](Generate& generator) {
263 generator.setFlag(Generate::TreehouseLayout);
264 generator.generate(
265 5, 5,
266 {{{Decoration::Star | Decoration::Color::Orange, 4},
267 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
268 },
269 [](Generate& generator) {
270 generator.setFlag(Generate::TreehouseLayout);
271 generator.generate(
272 5, 5,
273 {{{Decoration::Star | Decoration::Color::Orange, 6},
274 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
275 },
276 [](Generate& generator) {
277 generator.setFlag(Generate::RegularStartEnd);
278 generator.generate(
279 5, 5,
280 {{{Decoration::Star | Decoration::Color::Orange, 5},
281 {Decoration::Triangle | Decoration::Color::Orange, 3},
282 {Decoration::Stone | Decoration::Color::Orange, 3}}});
283 },
284 [](Generate& generator) {
285 generator.setFlag(Generate::TreehouseLayout);
286 generator.generate(5, 5,
287 {{{Decoration::Poly | Decoration::Color::Orange, 3},
288 {Decoration::Poly | Decoration::Negative |
289 Decoration::Color::Blue,
290 1},
291 {Decoration::Star | Decoration::Color::Orange, 5},
292 {Decoration::Star | Decoration::Color::Blue, 3}}});
293 },
294 [](Generate& generator) {
295 generator.setFlag(Generate::TreehouseLayout);
296 generator.generate(5, 5,
297 {{{Decoration::Poly | Decoration::Color::Orange, 3},
298 {Decoration::Poly | Decoration::Negative |
299 Decoration::Color::Blue,
300 2},
301 {Decoration::Star | Decoration::Color::Orange, 5},
302 {Decoration::Star | Decoration::Color::Blue, 3}}});
303 },
304 [](Generate& generator) {
305 generator.setFlag(Generate::TreehouseLayout);
306 generator.generate(
307 5, 5,
308 {{{Decoration::Poly | Decoration::Color::Orange, 1},
309 {Decoration::Poly | Decoration::Color::Magenta, 2},
310 {Decoration::Poly | Decoration::Negative |
311 Decoration::Color::Orange,
312 2},
313 {Decoration::Poly | Decoration::Negative |
314 Decoration::Color::Blue,
315 2},
316 {Decoration::Star | Decoration::Color::Orange, 3},
317 {Decoration::Star | Decoration::Color::Blue, 3},
318 {Decoration::Star | Decoration::Color::Magenta, 3}}});
319 },
320 [](Generate& generator) {
321 generator.setFlag(Generate::TreehouseLayout);
322 generator.generate(
323 5, 5,
324 {{{Decoration::Poly | Decoration::Color::Magenta, 2},
325 {Decoration::Poly | Decoration::Negative |
326 Decoration::Color::Blue,
327 2},
328 {Decoration::Star | Decoration::Color::Magenta, 3},
329 {Decoration::Star | Decoration::Color::Blue, 3},
330 {Decoration::Triangle | Decoration::Color::Magenta, 2},
331 {Decoration::Triangle | Decoration::Color::Blue, 2}}});
332 },
333 [](Generate& generator) {
334 generator.setFlag(Generate::TreehouseLayout);
335 generator.generate(
336 5, 5,
337 {{{Decoration::Poly | Decoration::Color::Orange, 1},
338 {Decoration::Poly | Decoration::Color::Blue, 1},
339 {Decoration::Poly | Decoration::Color::Green, 1},
340 {Decoration::Poly | Decoration::Negative |
341 Decoration::Color::Blue,
342 1},
343 {Decoration::Poly | Decoration::Negative |
344 Decoration::Color::Magenta,
345 2},
346 {Decoration::Star | Decoration::Color::Green, 2},
347 {Decoration::Star | Decoration::Color::Magenta, 1},
348 {Decoration::Star | Decoration::Color::Orange, 1},
349 {Decoration::Star | Decoration::Color::Blue, 2},
350 {Decoration::Triangle | Decoration::Color::Magenta, 2},
351 {Decoration::Triangle | Decoration::Color::Orange, 1},
352 {Decoration::Triangle | Decoration::Color::Green, 2}}});
353 },
354 [](Generate& generator) {
355 generator.setFlag(Generate::TreehouseLayout);
356 generator.generate(
357 5, 5,
358 {{{Decoration::Star | Decoration::Color::Orange, 4},
359 {Decoration::Star | Decoration::Color::Magenta, 4},
360 {Decoration::Triangle | Decoration::Color::Orange, 2},
361 {Decoration::Triangle | Decoration::Color::Magenta, 2}}});
362 },
363 [](Generate& generator) {
364 generator.setFlag(Generate::TreehouseLayout);
365 generator.generate(
366 5, 5,
367 {{{Decoration::Star | Decoration::Color::Orange, 3},
368 {Decoration::Star | Decoration::Color::Magenta, 3},
369 {Decoration::Star | Decoration::Color::Green, 6},
370 {Decoration::Triangle | Decoration::Color::Orange, 2},
371 {Decoration::Triangle | Decoration::Color::Magenta, 2}}});
372 },
373 [](Generate& generator) {
374 generator.setFlag(Generate::TreehouseLayout);
375 generator.generate(
376 5, 5,
377 {{{Decoration::Star | Decoration::Color::Orange, 4},
378 {Decoration::Star | Decoration::Color::Magenta, 4},
379 {Decoration::Star | Decoration::Color::Green, 6},
380 {Decoration::Triangle | Decoration::Color::Orange, 1},
381 {Decoration::Triangle | Decoration::Color::Magenta, 1}}});
382 },
383 [](Generate& generator) {
384 generator.setFlag(Generate::TreehouseLayout);
385 generator.generate(
386 5, 5,
387 {{{Decoration::Star | Decoration::Color::Orange, 2},
388 {Decoration::Star | Decoration::Color::Magenta, 2},
389 {Decoration::Star | Decoration::Color::White, 2},
390 {Decoration::Star | Decoration::Color::Green, 2},
391 {Decoration::Star | Decoration::Color::Black, 2},
392 {Decoration::Triangle | Decoration::Color::Orange, 1},
393 {Decoration::Triangle | Decoration::Color::Magenta, 1},
394 {Decoration::Triangle | Decoration::Color::White, 1},
395 {Decoration::Triangle | Decoration::Color::Green, 1},
396 {Decoration::Triangle | Decoration::Color::Black, 1}}});
397 },
398 [](Generate& generator) {
399 generator.setFlag(Generate::TreehouseLayout);
400 generator.generate(5, 5,
401 {{{Decoration::Star | Decoration::Color::Magenta, 4},
402 {Decoration::Star | Decoration::Color::Orange, 6},
403 {Decoration::Dot_Intersection, 36}}});
404 },
405 [](Generate& generator) {
406 generator.setGridSize(7, 7);
407 generator.setFlag(Generate::RequireCombineShapes);
408 generator.setSymmetry(Panel::ParallelV);
409 generator.setSymbol(Decoration::Start, 0, 14);
410 generator.setSymbol(Decoration::Start, 8, 14);
411 generator.setSymbol(Decoration::Exit, 6, 0);
412 generator.setSymbol(Decoration::Exit, 14, 0);
413 generator.generate(
414 7, 7, {{{Decoration::Poly | Decoration::Color::Orange, 5}}});
415 },
416 [](Generate& generator) {
417 generator.setGridSize(7, 7);
418 generator.setFlag(Generate::RequireCombineShapes);
419 generator.setSymmetry(Panel::ParallelHFlip);
420 generator.setSymbol(Decoration::Start, 0, 14);
421 generator.setSymbol(Decoration::Start, 14, 6);
422 generator.setSymbol(Decoration::Exit, 0, 0);
423 generator.setSymbol(Decoration::Exit, 14, 8);
424 generator.generate(
425 7, 7, {{{Decoration::Poly | Decoration::Color::Orange, 5}}});
426 },
427 [](Generate& generator) {
428 generator.setGridSize(7, 7);
429 generator.setFlag(Generate::RequireCombineShapes);
430 generator.setSymmetry(Panel::ParallelVFlip);
431 generator.setSymbol(Decoration::Start, 0, 14);
432 generator.setSymbol(Decoration::Start, 8, 0);
433 generator.setSymbol(Decoration::Exit, 6, 0);
434 generator.setSymbol(Decoration::Exit, 14, 14);
435 generator.generate(
436 7, 7, {{{Decoration::Poly | Decoration::Color::Orange, 5}}});
437 },
438 [](Generate& generator) {
439 generator.setSymmetry(Panel::Symmetry::RotateLeft);
440 generator.setSymbol(Decoration::Start, 4, 4);
441 generator.setSymbol(Decoration::Start, 10, 4);
442 generator.setSymbol(Decoration::Start, 4, 10);
443 generator.setSymbol(Decoration::Start, 10, 10);
444 generator.setSymbol(Decoration::Exit, 4, 0);
445 generator.setSymbol(Decoration::Exit, 14, 4);
446 generator.setSymbol(Decoration::Exit, 0, 10);
447 generator.setSymbol(Decoration::Exit, 10, 14);
448 generator.generate(
449 7, 7,
450 {{{Decoration::Triangle4 | Decoration::Color::Orange, 1},
451 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
452 },
453 [](Generate& generator) {
454 generator.setFlag(Generate::WriteInvisible);
455 generator.setFlag(Generate::StartEdgeOnly);
456 generator.setSymmetry(Panel::Symmetry::FlipXY);
457 generator.setSymbol(Decoration::Exit, 0, 8);
458 generator.setSymbol(Decoration::Exit, 8, 0);
459 generator.generate(7, 7,
460 {{{Decoration::Dot | Decoration::Color::Blue, 2},
461 {Decoration::Dot | Decoration::Color::Yellow, 2},
462 {Decoration::Dot, 8},
463 {Decoration::Eraser | Decoration::Color::White, 1},
464 {Decoration::Start, 1}}});
465 },
466 [](Generate& generator) {
467 generator.setSymmetry(Panel::Symmetry::FlipXY);
468 generator.setSymbol(Decoration::Start, 0, 16);
469 generator.setSymbol(Decoration::Start, 16, 0);
470 generator.setSymbol(Decoration::Exit, 8, 0);
471 generator.setSymbol(Decoration::Exit, 8, 16);
472 generator.setSymbol(Decoration::Exit, 0, 8);
473 generator.setSymbol(Decoration::Exit, 16, 8);
474 generator.generate(
475 8, 8,
476 {{{Decoration::Triangle | Decoration::Color::Cyan, 3},
477 {Decoration::Triangle | Decoration::Color::Yellow, 2},
478 {Decoration::Star | Decoration::Color::Cyan, 3},
479 {Decoration::Star | Decoration::Color::Yellow, 3},
480 {Decoration::Stone | Decoration::Color::Cyan, 2},
481 {Decoration::Stone | Decoration::Color::Yellow, 3}}});
482 },
483 [](Generate& generator) {
484 generator.setGridSize(7, 7);
485 generator.setSymmetry((Random::rand() % 2) == 0
486 ? Panel::Symmetry::Vertical
487 : Panel::Symmetry::Horizontal);
488 generator.setFlag(Generate::WriteInvisible);
489 generator.setFlag(Generate::DisableDotIntersection);
490 MakeSecretSymmetryGrid(generator);
491 generator.generate(
492 7, 7,
493 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
494 {Decoration::Dot | Decoration::Color::Yellow, 2},
495 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
496 },
497 [](Generate& generator) {
498 generator.setGridSize(7, 7);
499 generator.setSymmetry((Random::rand() % 2) == 0
500 ? Panel::Symmetry::ParallelH
501 : Panel::Symmetry::ParallelV);
502 generator.setFlag(Generate::WriteInvisible);
503 generator.setFlag(Generate::DisableDotIntersection);
504 MakeSecretSymmetryGrid(generator);
505 generator.generate(
506 7, 7,
507 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
508 {Decoration::Dot | Decoration::Color::Yellow, 2},
509 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
510 },
511 [](Generate& generator) {
512 generator.setGridSize(7, 7);
513 generator.setSymmetry(Panel::Symmetry::Rotational);
514 generator.setFlag(Generate::WriteInvisible);
515 generator.setFlag(Generate::DisableDotIntersection);
516 MakeSecretSymmetryGrid(generator);
517 generator.generate(
518 7, 7,
519 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
520 {Decoration::Dot | Decoration::Color::Yellow, 2},
521 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
522 },
523 [](Generate& generator) {
524 generator.setGridSize(7, 7);
525 generator.setSymmetry((Random::rand() % 2) == 0
526 ? Panel::Symmetry::ParallelHFlip
527 : Panel::Symmetry::ParallelVFlip);
528 generator.setFlag(Generate::WriteInvisible);
529 generator.setFlag(Generate::DisableDotIntersection);
530 MakeSecretSymmetryGrid(generator);
531 generator.generate(
532 7, 7,
533 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
534 {Decoration::Dot | Decoration::Color::Yellow, 2},
535 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
536 },
537 [](Generate& generator) {
538 generator.setFlag(Generate::RegularStartEnd);
539 generator.generate(
540 4, 4,
541 {{{Decoration::Triangle | Decoration::Color::Orange, 15},
542 {Decoration::Eraser | Decoration::Color::Purple, 1}}});
543 },
544 [](Generate& generator) {
545 generator.setFlag(Generate::RegularStartEnd);
546 generator.generate(
547 4, 4,
548 {{{Decoration::Stone | Decoration::Color::White, 1},
549 {Decoration::Stone | Decoration::Color::Black, 2},
550 {Decoration::Stone | Decoration::Color::Red, 2},
551 {Decoration::Star | Decoration::Color::White, 4},
552 {Decoration::Star | Decoration::Color::Black, 3},
553 {Decoration::Star | Decoration::Color::Red, 3},
554 {Decoration::Decoration::Eraser | Decoration::Color::Green, 1}}});
555 },
556 [](Generate& generator) {
557 generator.setFlag(Generate::RegularStartEnd);
558 generator.generate(
559 4, 4,
560 {{{Decoration::Poly | Decoration::Color::Yellow, 1},
561 {Decoration::Poly | Decoration::Color::Yellow |
562 Decoration::Can_Rotate,
563 1},
564 {Decoration::Triangle | Decoration::Color::Orange, 3}}});
565 },
566 [](Generate& generator) {
567 generator.setFlag(Generate::RegularStartEnd);
568 generator.generate(
569 4, 4,
570 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
571 {Decoration::Poly | Decoration::Color::Yellow |
572 Decoration::Can_Rotate,
573 1},
574 {Decoration::Triangle | Decoration::Color::Orange, 2},
575 {Decoration::Stone | Decoration::Color::Black, 2},
576 {Decoration::Stone | Decoration::Color::White, 2}}});
577 },
578 [](Generate& generator) {
579 generator.setSymbol(Decoration::Start, 4, 4);
580 generator.setSymbol(Decoration::Exit, 8, 0);
581 generator.generate(4, 4,
582 {{{Decoration::Poly | Decoration::Color::Yellow |
583 Decoration::Can_Rotate,
584 3},
585 {Decoration::Gap, 3}}});
586 },
587 [](Generate& generator) {
588 generator.setSymbol(Decoration::Start, 4, 6);
589 generator.setSymbol(Decoration::Exit, 10, 0);
590 generator.generate(5, 5,
591 {{{Decoration::Poly | Decoration::Color::Yellow |
592 Decoration::Can_Rotate,
593 3},
594 {Decoration::Gap, 3}}});
595 },
596 [](Generate& generator) {
597 generator.setFlag(Generate::DisconnectShapes);
598 generator.setSymbol(Decoration::Start, 4, 6);
599 generator.setSymbol(Decoration::Exit, 10, 0);
600 generator.generate(5, 5,
601 {{{Decoration::Poly | Decoration::Color::Yellow |
602 Decoration::Can_Rotate,
603 3}}});
604 },
605 [](Generate& generator) {
606 generator.setSymbol(Decoration::Exit, 10, 0);
607 generator.generate(5, 5,
608 {{{Decoration::Dot_Intersection, 36},
609 {Decoration::Poly | Decoration::Color::Yellow, 2},
610 {Decoration::Poly | Decoration::Color::Yellow |
611 Decoration::Can_Rotate,
612 1},
613 {Decoration::Start, 1}}});
614 },
615 [](Generate& generator) {
616 generator.setFlag(Generate::BigShapes);
617 generator.setSymbol(Decoration::Exit, 10, 0);
618 generator.generate(5, 5,
619 {{{Decoration::Dot_Intersection, 36},
620 {Decoration::Poly | Decoration::Color::Yellow, 3},
621 {Decoration::Start, 1}}});
622 },
623 [](Generate& generator) {
624 generator.setFlag(Generate::DisconnectShapes);
625 generator.setSymbol(Decoration::Exit, 10, 0);
626 generator.generate(5, 5,
627 {{{Decoration::Dot_Intersection, 36},
628 {Decoration::Poly | Decoration::Color::Yellow, 3},
629 {Decoration::Start, 1}}});
630 },
631 [](Generate& generator) {
632 generator.setFlag(Generate::TreehouseLayout);
633 generator.generate(
634 4, 4,
635 {{{Decoration::Triangle | Decoration::Color::Magenta, 4},
636 {Decoration::Stone | Decoration::Color::Black, 2},
637 {Decoration::Stone | Decoration::Color::White, 2},
638 {Decoration::Star | Decoration::Color::Black, 1},
639 {Decoration::Star | Decoration::Color::White, 1}}});
640 },
641 [](Generate& generator) {
642 generator.setFlag(Generate::TreehouseLayout);
643 generator.generate(
644 4, 4,
645 {{{Decoration::Triangle | Decoration::Color::Orange, 2},
646 {Decoration::Triangle | Decoration::Color::Magenta, 2},
647 {Decoration::Star | Decoration::Color::Magenta, 2},
648 {Decoration::Star | Decoration::Color::Green, 2},
649 {Decoration::Stone | Decoration::Color::Orange, 2},
650 {Decoration::Stone | Decoration::Color::Green, 2}}});
651 },
652 [](Generate& generator) {
653 generator.setFlag(Generate::TreehouseLayout);
654 generator.generate(
655 5, 4,
656 {{{Decoration::Triangle | Decoration::Color::Green, 3},
657 {Decoration::Triangle | Decoration::Color::Magenta, 2},
658 {Decoration::Star | Decoration::Color::Magenta, 3},
659 {Decoration::Star | Decoration::Color::Orange, 3},
660 {Decoration::Stone | Decoration::Color::Orange, 2},
661 {Decoration::Stone | Decoration::Color::Green, 2}}});
662 },
663 [](Generate& generator) {
664 generator.setFlag(Generate::TreehouseLayout);
665 generator.generate(
666 4, 4,
667 {{{Decoration::Star | Decoration::Color::Black, 1},
668 {Decoration::Star | Decoration::Color::White, 2},
669 {Decoration::Stone | Decoration::Color::Black, 2},
670 {Decoration::Stone | Decoration::Color::White, 1},
671 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
672 1},
673 {Decoration::Poly | Decoration::Black, 1}}});
674 },
675 [](Generate& generator) {
676 generator.setFlag(Generate::TreehouseLayout);
677 generator.generate(
678 4, 4,
679 {{{Decoration::Star | Decoration::Color::Black, 1},
680 {Decoration::Star | Decoration::Color::White, 2},
681 {Decoration::Stone | Decoration::Color::Black, 2},
682 {Decoration::Stone | Decoration::Color::White, 1},
683 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
684 1},
685 {Decoration::Poly | Decoration::White, 1}}});
686 },
687 [](Generate& generator) {
688 generator.setFlag(Generate::TreehouseLayout);
689 generator.generate(
690 5, 5,
691 {{{Decoration::Star | Decoration::Color::Green, 2},
692 {Decoration::Star | Decoration::Color::Magenta, 4},
693 {Decoration::Stone | Decoration::Color::Green, 2},
694 {Decoration::Stone | Decoration::Color::Magenta, 2},
695 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Green,
696 1},
697 {Decoration::Poly | Decoration::Green, 1}}});
698 },
699 [](Generate& generator) {
700 generator.setFlag(Generate::TreehouseLayout);
701 generator.setFlag(Generate::BigShapes);
702 generator.generate(
703 5, 5,
704 {{{Decoration::Star | Decoration::Color::Green, 3},
705 {Decoration::Star | Decoration::Color::Magenta, 4},
706 {Decoration::Stone | Decoration::Color::Green, 2},
707 {Decoration::Stone | Decoration::Color::Magenta, 2},
708 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Green,
709 1},
710 {Decoration::Poly | Decoration::Magenta, 1}}});
711 },
712 [](Generate& generator) {
713 generator.setFlag(Generate::TreehouseLayout);
714 generator.generate(
715 5, 5,
716 {{{Decoration::Star | Decoration::Color::Black, 2},
717 {Decoration::Star | Decoration::Color::White, 3},
718 {Decoration::Stone | Decoration::Color::Black, 2},
719 {Decoration::Stone | Decoration::Color::White, 1},
720 {Decoration::Triangle | Decoration::Color::Black, 2},
721 {Decoration::Triangle | Decoration::Color::White, 1},
722 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
723 1},
724 {Decoration::Poly | Decoration::White, 1}}});
725 },
726 [](Generate& generator) {
727 generator.setFlag(Generate::TreehouseLayout);
728 generator.generate(
729 5, 5,
730 {{{Decoration::Star | Decoration::Color::Black, 3},
731 {Decoration::Star | Decoration::Color::White, 3},
732 {Decoration::Stone | Decoration::Color::Black, 1},
733 {Decoration::Stone | Decoration::Color::White, 1},
734 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
735 1},
736 {Decoration::Poly | Decoration::Can_Rotate | Decoration::White,
737 1},
738 {Decoration::Triangle | Decoration::Black, 1},
739 {Decoration::Triangle | Decoration::White, 1}}});
740 },
741 [](Generate& generator) {
742 generator.setGridSize(5, 5);
743 generator.setSymbol(Decoration::Start, 10, 10);
744 generator.setSymbol(Decoration::Exit, 0, 0);
745 generator.generate(
746 5, 5,
747 {{{Decoration::Star | Decoration::White, 3},
748 {Decoration::Star | Decoration::Black, 8},
749 {Decoration::Star | Decoration::Magenta, 6},
750 {Decoration::Eraser | Decoration::Color::White, 1}}});
751 },
752 [](Generate& generator) {
753 generator.setFlag(Generate::RegularStartEnd);
754 generator.setFlag(Generate::DisconnectShapes);
755 generator.generate(
756 4, 4,
757 {{{Decoration::Poly | Decoration::Color::Yellow, 4},
758 {Decoration::Eraser | Decoration::Color::White, 1}}});
759 },
760 [](Generate& generator) {
761 generator.setFlag(Generate::RegularStartEnd);
762 generator.generate(
763 4, 4,
764 {{{Decoration::Poly | Decoration::Color::Yellow, 4},
765 {Decoration::Poly | Decoration::Negative |
766 Decoration::Color::Blue,
767 1},
768 {Decoration::Eraser | Decoration::Color::White, 1}}});
769 },
770 [](Generate& generator) {
771 generator.setFlag(Generate::RegularStartEnd);
772 generator.setFlag(Generate::DisconnectShapes);
773 generator.generate(
774 4, 4,
775 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
776 {Decoration::Poly | Decoration::Negative |
777 Decoration::Color::Blue,
778 1},
779 {Decoration::Eraser | Decoration::Color::White, 1}}});
780 },
781 [](Generate& generator) {
782 generator.setFlag(Generate::RegularStartEnd);
783 generator.generate(4, 4,
784 {{{Decoration::Star | Decoration::Color::Green, 7},
785 {Decoration::Star | Decoration::Color::Orange, 5},
786 {Decoration::Eraser | Decoration::Green, 1},
787 {Decoration::Eraser | Decoration::Orange, 1}}});
788 },
789 [](Generate& generator) {
790 generator.setFlag(Generate::RegularStartEnd);
791 generator.generate(5, 5,
792 {{{Decoration::Star | Decoration::Color::Magenta, 8},
793 {Decoration::Star | Decoration::Color::Orange, 6},
794 {Decoration::Star | Decoration::Color::Green, 4},
795 {Decoration::Eraser | Decoration::Magenta, 1},
796 {Decoration::Eraser | Decoration::Orange, 1}}});
797 },
798 [](Generate& generator) {
799 generator.setFlag(Generate::RegularStartEnd);
800 generator.generate(
801 4, 4,
802 {{{Decoration::Poly | Decoration::Color::Green, 4},
803 {Decoration::Eraser | Decoration::Color::White, 2}}});
804 },
805 [](Generate& generator) {
806 generator.setFlag(Generate::RegularStartEnd);
807 generator.setFlag(Generate::DisconnectShapes);
808 generator.generate(
809 4, 4,
810 {{{Decoration::Poly | Decoration::Color::Green, 4},
811 {Decoration::Eraser | Decoration::Color::White, 2}}});
812 },
813 [](Generate& generator) {
814 generator.setFlag(Generate::RegularStartEnd);
815 generator.generate(
816 4, 4,
817 {{{Decoration::Poly | Decoration::Color::Green, 2},
818 {Decoration::Poly | Decoration::Color::Magenta, 1},
819 {Decoration::Star | Decoration::Color::Green, 2},
820 {Decoration::Star | Decoration::Color::Magenta, 2},
821 {Decoration::Eraser | Decoration::Color::White, 2}}});
822 },
823 [](Generate& generator) {
824 generator.setFlag(Generate::RegularStartEnd);
825 generator.generate(6, 3,
826 {{{Decoration::Star | Decoration::Color::Orange, 4},
827 {Decoration::Poly | Decoration::Color::Orange, 2},
828 {Decoration::Poly | Decoration::Negative |
829 Decoration::Color::Magenta,
830 2},
831 {Decoration::Eraser | Decoration::White, 2}}});
832 },
833 [](Generate& generator) {
834 generator.setFlag(Generate::RegularStartEnd);
835 generator.generate(6, 3,
836 {{{Decoration::Star | Decoration::Color::Magenta, 2},
837 {Decoration::Star | Decoration::Color::Orange, 3},
838 {Decoration::Poly | Decoration::Color::Orange, 2},
839 {Decoration::Poly | Decoration::Negative |
840 Decoration::Color::Magenta,
841 2},
842 {Decoration::Eraser | Decoration::White, 2}}});
843 },
844 [](Generate& generator) {
845 generator.setFlag(Generate::FalseParity);
846 generator.setSymbol(Decoration::Exit, 0, 0);
847 generator.setSymbol(Decoration::Exit, 16, 0);
848 generator.setSymbol(Decoration::Exit, 0, 16);
849 generator.setSymbol(Decoration::Exit, 16, 16);
850 generator.generate(
851 8, 8,
852 {{{Decoration::Stone | Decoration::Color::White, 10},
853 {Decoration::Stone | Decoration::Color::Black, 10},
854 {Decoration::Dot_Intersection, 81},
855 {Decoration::Start, 7},
856 {Decoration::Eraser | Decoration::Color::Purple, 1}}});
857 },
858 [](Generate& generator) {
859 generator.setFlag(Generate::TreehouseLayout);
860 generator.generate(
861 4, 5,
862 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
863 {Decoration::Triangle | Decoration::Color::Orange, 5},
864 {Decoration::Eraser | Decoration::Color::White, 1}}});
865 },
866 [](Generate& generator) {
867 generator.setFlag(Generate::RegularStartEnd);
868 generator.generate(
869 5, 5,
870 {{{Decoration::Poly | Decoration::Color::Yellow, 7},
871 {Decoration::Stone | Decoration::Color::White, 3},
872 {Decoration::Stone | Decoration::Color::Black, 3},
873 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
874 },
875 [](Generate& generator) {
876 generator.setSymbol(Decoration::Exit, 10, 0);
877 generator.generate(
878 5, 5,
879 {{{Decoration::Dot_Intersection, 36},
880 {Decoration::Triangle1 | Decoration::Color::Orange, 4},
881 {Decoration::Start, 1}}});
882 },
883 [](Generate& generator) {
884 generator.setSymbol(Decoration::Exit, 10, 0);
885 generator.generate(
886 5, 5,
887 {{{Decoration::Dot_Intersection, 36},
888 {Decoration::Triangle3 | Decoration::Color::Orange, 6},
889 {Decoration::Start, 1}}});
890 },
891 [](Generate& generator) {
892 generator.setSymbol(Decoration::Exit, 10, 0);
893 generator.generate(
894 5, 5,
895 {{{Decoration::Dot_Intersection, 36},
896 {Decoration::Triangle2 | Decoration::Color::Orange, 10},
897 {Decoration::Start, 1}}});
898 },
899 [](Generate& generator) {
900 generator.setSymbol(Decoration::Exit, 10, 0);
901 generator.generate(
902 5, 5,
903 {{{Decoration::Dot_Intersection, 36},
904 {Decoration::Triangle | Decoration::Color::Orange, 8},
905 {Decoration::Start, 1}}});
906 },
907 [](Generate& generator) {
908 generator.setFlag(Generate::RegularStartEnd);
909 generator.setFlag(Generate::FalseParity);
910 generator.generate(
911 5, 5,
912 {{{Decoration::Dot_Intersection, 36},
913 {Decoration::Triangle | Decoration::Color::Orange, 7},
914 {Decoration::Eraser | Decoration::Color::White, 1}}});
915 },
916 [](Generate& generator) {
917 generator.setFlag(Generate::RegularStartEnd);
918 generator.setFlag(Generate::SmallShapes);
919 generator.generate(
920 5, 5,
921 {{{Decoration::Poly | Decoration::Can_Rotate |
922 Decoration::Color::Orange,
923 3},
924 {Decoration::Poly | Decoration::Can_Rotate |
925 Decoration::Color::Magenta,
926 2},
927 {Decoration::Star | Decoration::Color::Orange, 4},
928 {Decoration::Star | Decoration::Color::Magenta, 5}}});
929 },
930 };
931
932 return generator_fns;
933}