about summary refs log tree commit diff stats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/wittle_generator/Base64.h2
-rw-r--r--ext/wittle_generator/CMakeLists.txt2
-rw-r--r--ext/wittle_generator/Generate.cpp3
-rw-r--r--ext/wittle_generator/Panel.h1
-rw-r--r--ext/wittle_generator/PuzzlesetEasy.cpp379
-rw-r--r--ext/wittle_generator/PuzzlesetEasy.h11
-rw-r--r--ext/wittle_generator/PuzzlesetHard.cpp933
-rw-r--r--ext/wittle_generator/PuzzlesetHard.h11
-rw-r--r--ext/wittle_generator/PuzzlesetMedium.cpp596
-rw-r--r--ext/wittle_generator/PuzzlesetMedium.h11
-rw-r--r--ext/wittle_generator/Test.cpp47
-rw-r--r--ext/wittle_generator/wittle_generator.cpp1889
12 files changed, 1989 insertions, 1896 deletions
diff --git a/ext/wittle_generator/Base64.h b/ext/wittle_generator/Base64.h index 2f30c1a..707a5a5 100644 --- a/ext/wittle_generator/Base64.h +++ b/ext/wittle_generator/Base64.h
@@ -25,6 +25,8 @@
25 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 */ 26 */
27 27
28#include <stdint.h>
29
28#include <string> 30#include <string>
29 31
30namespace macaron { 32namespace macaron {
diff --git a/ext/wittle_generator/CMakeLists.txt b/ext/wittle_generator/CMakeLists.txt index 561e78a..8a1928e 100644 --- a/ext/wittle_generator/CMakeLists.txt +++ b/ext/wittle_generator/CMakeLists.txt
@@ -1,6 +1,6 @@
1cmake_minimum_required (VERSION 3.1) 1cmake_minimum_required (VERSION 3.1)
2project (wittle_generator) 2project (wittle_generator)
3 3
4add_executable(wittle_generator Generate.cpp Panel.cpp Random.cpp Serializer.cpp Test.cpp) 4add_executable(wittle_generator Generate.cpp Panel.cpp Random.cpp Serializer.cpp Test.cpp PuzzlesetEasy.cpp PuzzlesetMedium.cpp PuzzlesetHard.cpp)
5set_property(TARGET wittle_generator PROPERTY CXX_STANDARD 17) 5set_property(TARGET wittle_generator PROPERTY CXX_STANDARD 17)
6set_property(TARGET wittle_generator PROPERTY CXX_STANDARD_REQUIRED ON) 6set_property(TARGET wittle_generator PROPERTY CXX_STANDARD_REQUIRED ON)
diff --git a/ext/wittle_generator/Generate.cpp b/ext/wittle_generator/Generate.cpp index b80b751..3d907cb 100644 --- a/ext/wittle_generator/Generate.cpp +++ b/ext/wittle_generator/Generate.cpp
@@ -485,8 +485,7 @@ bool Generate::generate_maze(int id, int numStarts, int numExits) {
485}*/ 485}*/
486 486
487void Generate::generate(int width, int height, PuzzleSymbols symbols) { 487void Generate::generate(int width, int height, PuzzleSymbols symbols) {
488 while (!generateInternal(width, height, symbols)) 488 while (!generateInternal(width, height, symbols));
489 ;
490} 489}
491 490
492// The primary generation function. id - id of the puzzle. symbols - a structure 491// The primary generation function. id - id of the puzzle. symbols - a structure
diff --git a/ext/wittle_generator/Panel.h b/ext/wittle_generator/Panel.h index 3bc23c9..3108af8 100644 --- a/ext/wittle_generator/Panel.h +++ b/ext/wittle_generator/Panel.h
@@ -3,6 +3,7 @@
3 3
4#include <stdint.h> 4#include <stdint.h>
5 5
6#include <string>
6#include <tuple> 7#include <tuple>
7#include <vector> 8#include <vector>
8 9
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
5const 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}
diff --git a/ext/wittle_generator/PuzzlesetEasy.h b/ext/wittle_generator/PuzzlesetEasy.h new file mode 100644 index 0000000..98c0bac --- /dev/null +++ b/ext/wittle_generator/PuzzlesetEasy.h
@@ -0,0 +1,11 @@
1#ifndef PUZZLESET_EASY_H_65DB9C60
2#define PUZZLESET_EASY_H_65DB9C60
3
4#include <functional>
5#include <vector>
6
7class Generate;
8
9const std::vector<std::function<void(Generate&)>>& GetEasyPuzzles();
10
11#endif /* end of include guard: PUZZLESET_EASY_H_65DB9C60 */
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}
diff --git a/ext/wittle_generator/PuzzlesetHard.h b/ext/wittle_generator/PuzzlesetHard.h new file mode 100644 index 0000000..a4e1d7a --- /dev/null +++ b/ext/wittle_generator/PuzzlesetHard.h
@@ -0,0 +1,11 @@
1#ifndef PUZZLESET_HARD_H_8D67E34F
2#define PUZZLESET_HARD_H_8D67E34F
3
4#include <functional>
5#include <vector>
6
7class Generate;
8
9const std::vector<std::function<void(Generate&)>>& GetHardPuzzles();
10
11#endif /* end of include guard: PUZZLESET_HARD_H_8D67E34F */
diff --git a/ext/wittle_generator/PuzzlesetMedium.cpp b/ext/wittle_generator/PuzzlesetMedium.cpp new file mode 100644 index 0000000..afc7e45 --- /dev/null +++ b/ext/wittle_generator/PuzzlesetMedium.cpp
@@ -0,0 +1,596 @@
1#include "PuzzlesetMedium.h"
2
3#include "Generate.h"
4
5const std::vector<std::function<void(Generate&)>>& GetMediumPuzzles() {
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,
12 {{{Decoration::Stone | Decoration::Color::White, 5},
13 {Decoration::Stone | Decoration::Color::Black, 5},
14 {Decoration::Dot, 4},
15 {Decoration::Eraser | Decoration::Color::Green, 1}}});
16 },
17 [](Generate& generator) {
18 generator.setSymbol(Decoration::Exit, 0, 0);
19 generator.setSymbol(Decoration::Exit, 7 * 2, 0);
20 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2);
21 generator.generate(7, 7,
22 {{{Decoration::Stone | Decoration::Color::White, 10},
23 {Decoration::Stone | Decoration::Color::Black, 10},
24 {Decoration::Dot, 10},
25 {Decoration::Start, 4}}});
26 },
27 [](Generate& generator) {
28 generator.setSymbol(Decoration::Exit, 0, 0);
29 generator.setSymbol(Decoration::Exit, 7 * 2, 0);
30 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2);
31 generator.generate(
32 7, 7,
33 {{{Decoration::Stone | Decoration::Color::White, 10},
34 {Decoration::Stone | Decoration::Color::Black, 10},
35 {Decoration::Dot, 10},
36 {Decoration::Eraser | Decoration::Color::Purple, 1},
37 {Decoration::Start, 3}}});
38 },
39 [](Generate& generator) {
40 generator.setFlag(Generate::RegularStartEnd);
41 generator.generate(5, 5,
42 {{{Decoration::Star | Decoration::White, 8},
43 {Decoration::Star | Decoration::Black, 6}}});
44 },
45 [](Generate& generator) {
46 generator.setFlag(Generate::RegularStartEnd);
47 generator.setFlag(Generate::DisconnectShapes);
48 generator.generate(
49 4, 4,
50 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
51 {Decoration::Eraser | Decoration::Color::White, 1}}});
52 },
53 [](Generate& generator) {
54 generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2);
55 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
56 generator.generate(
57 4, 4,
58 {{{Decoration::Dot_Intersection, 25},
59 {Decoration::Stone | Decoration::Color::Black, 2},
60 {Decoration::Stone | Decoration::Color::White, 2}}});
61 },
62 [](Generate& generator) {
63 generator.setFlag(Generate::RegularStartEnd);
64 generator.setFlag(Generate::RequireCancelShapes);
65 generator.generate(6, 6,
66 {{{Decoration::Dot_Intersection, 49},
67 {Decoration::Poly | Decoration::Color::Yellow, 1},
68 {Decoration::Poly | Decoration::Color::Yellow |
69 Decoration::Can_Rotate,
70 2},
71 {Decoration::Poly | Decoration::Color::Blue |
72 Decoration::Negative,
73 3}}});
74 },
75 [](Generate& generator) {
76 generator.setFlag(Generate::RegularStartEnd);
77 generator.generate(
78 4, 4,
79 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
80 {Decoration::Eraser | Decoration::Color::White, 1}}});
81 },
82 [](Generate& generator) {
83 generator.setSymbol(Decoration::Start, 0, 3 * 2);
84 generator.setSymbol(Decoration::Exit, 6 * 2, 3 * 2);
85 generator.generate(6, 3,
86 {{{Decoration::Star | Decoration::Color::Magenta, 3},
87 {Decoration::Poly | Decoration::Color::Yellow, 3},
88 {Decoration::Eraser | Decoration::White, 1}}});
89 },
90 [](Generate& generator) {
91 generator.setSymbol(Decoration::Start, 0, 3 * 2);
92 generator.setSymbol(Decoration::Exit, 6 * 2, 3 * 2);
93 generator.generate(6, 3,
94 {{{Decoration::Star | Decoration::Color::Magenta, 5},
95 {Decoration::Poly | Decoration::Color::Yellow, 3},
96 {Decoration::Eraser | Decoration::White, 1}}});
97 },
98 [](Generate& generator) {
99 generator.setSymbol(Decoration::Start, 0, 3 * 2);
100 generator.setSymbol(Decoration::Exit, 6 * 2, 3 * 2);
101 generator.generate(6, 3,
102 {{{Decoration::Star | Decoration::Color::Magenta, 6},
103 {Decoration::Poly | Decoration::Color::Yellow, 3},
104 {Decoration::Eraser | Decoration::White, 1}}});
105 },
106 [](Generate& generator) {
107 generator.setSymbol(Decoration::Start, 0, 3 * 2);
108 generator.setSymbol(Decoration::Exit, 7 * 2, 3 * 2);
109 generator.generate(7, 3,
110 {{{Decoration::Star | Decoration::Color::Magenta, 5},
111 {Decoration::Poly | Decoration::Color::Yellow, 3},
112 {Decoration::Eraser | Decoration::White, 1}}});
113 },
114 [](Generate& generator) {
115 generator.setFlag(Generate::TreehouseLayout);
116 generator.generate(
117 4, 4,
118 {{{Decoration::Star | Decoration::Color::Orange, 6},
119 {Decoration::Star | Decoration::Color::Magenta, 6},
120 {Decoration::Star | Decoration::Color::Green, 4}}});
121 },
122 [](Generate& generator) {
123 generator.setFlag(Generate::TreehouseLayout);
124 generator.setFlag(Generate::FullGaps);
125 generator.generate(5, 5,
126 {{{Decoration::Star | Decoration::Color::Magenta, 8},
127 {Decoration::Dot_Intersection, 9},
128 {Decoration::Gap, 5}}});
129 },
130 [](Generate& generator) {
131 generator.setFlag(Generate::TreehouseLayout);
132 generator.generate(
133 4, 4,
134 {{{Decoration::Star | Decoration::Color::Black, 4},
135 {Decoration::Star | Decoration::Color::White, 4},
136 {Decoration::Stone | Decoration::Color::Black, 2},
137 {Decoration::Stone | Decoration::Color::White, 2}}});
138 },
139 [](Generate& generator) {
140 generator.setFlag(Generate::TreehouseLayout);
141 generator.generate(
142 5, 5,
143 {{{Decoration::Poly | Decoration::Color::Orange, 2},
144 {Decoration::Poly | Decoration::Color::Magenta, 1},
145 {Decoration::Star | Decoration::Color::Magenta, 3}}});
146 },
147 [](Generate& generator) {
148 generator.setFlag(Generate::TreehouseLayout);
149 generator.setFlag(Generate::RequireCombineShapes);
150 generator.generate(
151 5, 5,
152 {{{Decoration::Poly | Decoration::Color::Orange, 1},
153 {Decoration::Poly | Decoration::Can_Rotate |
154 Decoration::Color::Orange,
155 1},
156 {Decoration::Star | Decoration::Color::Magenta, 4},
157 {Decoration::Star | Decoration::Color::Green, 4}}});
158 },
159 [](Generate& generator) {
160 generator.setFlag(Generate::RegularStartEnd);
161 generator.generate(
162 4, 4,
163 {{{Decoration::Poly | Decoration::Color::Orange, 3},
164 {Decoration::Stone | Decoration::Color::White, 2},
165 {Decoration::Stone | Decoration::Color::Black, 2}}});
166 },
167 [](Generate& generator) {
168 generator.setFlag(Generate::RegularStartEnd);
169 generator.generate(4, 4,
170 {{{Decoration::Dot_Intersection, 25},
171 {Decoration::Poly | Decoration::Can_Rotate |
172 Decoration::Color::Yellow,
173 2}}});
174 },
175 [](Generate& generator) {
176 generator.setFlag(Generate::RegularStartEnd);
177 generator.setFlag(Generate::SmallShapes);
178 generator.generate(
179 5, 5,
180 {{{Decoration::Poly | Decoration::Can_Rotate |
181 Decoration::Color::Yellow,
182 4},
183 {Decoration::Star | Decoration::Color::Orange, 6}}});
184 },
185 [](Generate& generator) {
186 generator.setFlag(Generate::RegularStartEnd);
187 generator.generate(5, 5,
188 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
189 {Decoration::Gap, 5}}});
190 },
191 [](Generate& generator) {
192 generator.setFlag(Generate::RegularStartEnd);
193 generator.generate(
194 5, 5, {{{Decoration::Poly | Decoration::Color::Yellow, 4}}});
195 },
196 [](Generate& generator) {
197 generator.setFlag(Generate::RegularStartEnd);
198 generator.setFlag(Generate::DisconnectShapes);
199 generator.generate(
200 4, 4, {{{Decoration::Poly | Decoration::Color::Yellow, 3}}});
201 },
202 [](Generate& generator) {
203 generator.setFlag(Generate::RegularStartEnd);
204 generator.generate(5, 5,
205 {{{Decoration::Poly | Decoration::Can_Rotate |
206 Decoration::Color::Yellow,
207 2},
208 {Decoration::Poly | Decoration::Color::Yellow, 1},
209 {Decoration::Gap, 2}}});
210 },
211 [](Generate& generator) {
212 generator.setFlag(Generate::RegularStartEnd);
213 generator.setFlag(Generate::BigShapes);
214 generator.generate(5, 5,
215 {{{Decoration::Poly | Decoration::Can_Rotate |
216 Decoration::Color::Yellow,
217 3}}});
218 },
219 [](Generate& generator) {
220 generator.setFlag(Generate::RegularStartEnd);
221 generator.generate(
222 5, 6, {{{Decoration::Poly | Decoration::Color::Yellow, 5}}});
223 },
224 [](Generate& generator) {
225 generator.setFlag(Generate::RegularStartEnd);
226 generator.setFlag(Generate::BigShapes);
227 generator.generate(4, 4,
228 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
229 {Decoration::Poly | Decoration::Negative |
230 Decoration::Color::Blue,
231 2}}});
232 },
233 [](Generate& generator) {
234 generator.setFlag(Generate::RegularStartEnd);
235 generator.generate(4, 4,
236 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
237 {Decoration::Poly | Decoration::Negative |
238 Decoration::Color::Blue,
239 2}}});
240 },
241 [](Generate& generator) {
242 generator.setFlag(Generate::RegularStartEnd);
243 generator.generate(
244 4, 4, {{{Decoration::Triangle | Decoration::Color::Orange, 8}}});
245 },
246 [](Generate& generator) {
247 generator.setFlag(Generate::RegularStartEnd);
248 generator.setFlag(Generate::LongestPath);
249 generator.setFlag(Generate::FullGaps);
250 generator.generate(
251 6, 6,
252 {{{Decoration::Dot_Intersection, 12}, {Decoration::Gap, 18}}});
253 },
254 [](Generate& generator) {
255 generator.generate(5, 5,
256 {{{Decoration::Start, 8},
257 {Decoration::Exit, 1},
258 {Decoration::Dot_Intersection, 36}}});
259 },
260 [](Generate& generator) {
261 generator.setFlag(Generate::RegularStartEnd);
262 generator.setSymmetry(Panel::Horizontal);
263 generator.generate(
264 6, 6,
265 {{{Decoration::Triangle | Decoration::Color::Orange, 12},
266 {Decoration::Start, 1},
267 {Decoration::Exit, 1}}});
268 },
269 [](Generate& generator) {
270 generator.setFlag(Generate::RegularStartEnd);
271 generator.generate(
272 4, 4,
273 {{{Decoration::Dot, 4},
274 {Decoration::Stone | Decoration::Color::Black, 2},
275 {Decoration::Stone | Decoration::Color::White, 2},
276 {Decoration::Star | Decoration::Color::Black, 2},
277 {Decoration::Star | Decoration::Color::White, 2}}});
278 },
279 [](Generate& generator) {
280 generator.setFlag(Generate::RegularStartEnd);
281 generator.generate(
282 4, 4,
283 {{{Decoration::Dot, 4},
284 {Decoration::Stone | Decoration::Color::Black, 1},
285 {Decoration::Stone | Decoration::Color::White, 3},
286 {Decoration::Star | Decoration::Color::Black, 3},
287 {Decoration::Star | Decoration::Color::White, 1}}});
288 },
289 [](Generate& generator) {
290 generator.setFlag(Generate::RegularStartEnd);
291 generator.generate(
292 5, 5,
293 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
294 {Decoration::Stone | Decoration::Color::Black, 4},
295 {Decoration::Stone | Decoration::Color::White, 4}}});
296 },
297 [](Generate& generator) {
298 generator.setFlag(Generate::RegularStartEnd);
299 generator.generate(
300 5, 5,
301 {{{Decoration::Stone | Decoration::Color::Cyan, 2},
302 {Decoration::Stone | Decoration::Color::Yellow, 2},
303 {Decoration::Star | Decoration::Color::Cyan, 3},
304 {Decoration::Star | Decoration::Color::Yellow, 3}}});
305 },
306 [](Generate& generator) {
307 generator.setFlag(Generate::RegularStartEnd);
308 generator.generate(
309 6, 6,
310 {{{Decoration::Stone | Decoration::Color::Cyan, 2},
311 {Decoration::Stone | Decoration::Color::Magenta, 2},
312 {Decoration::Star | Decoration::Color::Cyan, 2},
313 {Decoration::Star | Decoration::Color::Magenta, 1},
314 {Decoration::Poly | Decoration::Color::Cyan, 1},
315 {Decoration::Poly | Decoration::Color::Magenta, 1}}});
316 },
317 [](Generate& generator) {
318 generator.setFlag(Generate::RegularStartEnd);
319 generator.generate(
320 5, 5, {{{Decoration::Triangle | Decoration::Color::Orange, 10}}});
321 },
322 [](Generate& generator) {
323 generator.setFlag(Generate::RegularStartEnd);
324 generator.generate(
325 5, 3,
326 {{{Decoration::Stone | Decoration::Color::Black, 4},
327 {Decoration::Stone | Decoration::Color::White, 3},
328 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
329 },
330 [](Generate& generator) {
331 generator.setFlag(Generate::RegularStartEnd);
332 generator.generate(
333 4, 4,
334 {{{Decoration::Dot, 25},
335 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
336 },
337 [](Generate& generator) {
338 generator.setFlag(Generate::RegularStartEnd);
339 generator.setFlag(Generate::RequireCombineShapes);
340 generator.setSymmetry(Panel::Rotational);
341 generator.generate(
342 5, 5, {{{Decoration::Poly | Decoration::Color::Yellow, 3}}});
343 },
344 [](Generate& generator) {
345 generator.setFlag(Generate::RegularStartEnd);
346 generator.setFlag(Generate::DisconnectShapes);
347 generator.setFlag(Generate::BigShapes);
348 generator.generate(
349 5, 5, {{{Decoration::Poly | Decoration::Color::Yellow, 3}}});
350 },
351 [](Generate& generator) {
352 generator.setFlag(Generate::RegularStartEnd);
353 generator.setFlag(Generate::DisconnectShapes);
354 generator.generate(4, 4,
355 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
356 {Decoration::Poly | Decoration::Color::Blue |
357 Decoration::Negative,
358 1}}});
359 },
360 [](Generate& generator) {
361 generator.setFlag(Generate::RegularStartEnd);
362 generator.generate(
363 4, 4,
364 {{{Decoration::Stone | Decoration::Color::Black, 3},
365 {Decoration::Stone | Decoration::Color::White, 3},
366 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
367 },
368 [](Generate& generator) {
369 generator.setFlag(Generate::RegularStartEnd);
370 generator.generate(
371 4, 4,
372 {{{Decoration::Star | Decoration::Color::Black, 4},
373 {Decoration::Star | Decoration::Color::White, 4},
374 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
375 },
376 [](Generate& generator) {
377 generator.setFlag(Generate::RegularStartEnd);
378 generator.generate(
379 4, 4,
380 {{{Decoration::Star | Decoration::Color::Orange, 3},
381 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
382 },
383 [](Generate& generator) {
384 generator.setFlag(Generate::RegularStartEnd);
385 generator.generate(
386 4, 4,
387 {{{Decoration::Star | Decoration::Color::Black, 2},
388 {Decoration::Star | Decoration::Color::Orange, 2},
389 {Decoration::Stone | Decoration::Color::Black, 1},
390 {Decoration::Stone | Decoration::Color::Orange, 1},
391 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
392 },
393 [](Generate& generator) {
394 generator.setFlag(Generate::RegularStartEnd);
395 generator.setFlag(Generate::BigShapes);
396 generator.generate(
397 4, 4,
398 {{{Decoration::Poly | Decoration::Color::Yellow |
399 Decoration::Can_Rotate,
400 1},
401 {Decoration::Triangle | Decoration::Color::Orange, 3}}});
402 },
403 [](Generate& generator) {
404 generator.setFlag(Generate::RegularStartEnd);
405 generator.setFlag(Generate::BigShapes);
406 generator.generate(
407 5, 5,
408 {{{Decoration::Poly | Decoration::Color::Yellow |
409 Decoration::Can_Rotate,
410 1},
411 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
412 },
413 [](Generate& generator) {
414 generator.setFlag(Generate::RegularStartEnd);
415 generator.setFlag(Generate::BigShapes);
416 generator.generate(
417 5, 5,
418 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
419 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
420 },
421 [](Generate& generator) {
422 generator.setFlag(Generate::RegularStartEnd);
423 generator.generate(
424 4, 4,
425 {{{Decoration::Dot, 25},
426 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
427 },
428 [](Generate& generator) {
429 generator.setSymbol(Decoration::Start, 0, 4 * 2);
430 generator.setSymbol(Decoration::Exit, 0, 0);
431 generator.generate(
432 4, 4,
433 {{{Decoration::Dot, 25},
434 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
435 },
436 [](Generate& generator) {
437 generator.setSymbol(Decoration::Start, 0, 4 * 2);
438 generator.setSymbol(Decoration::Exit, 4 * 2, 4 * 2);
439 generator.generate(
440 4, 4,
441 {{{Decoration::Dot, 25},
442 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
443 },
444 [](Generate& generator) {
445 generator.setFlag(Generate::RegularStartEnd);
446 generator.generate(
447 4, 4,
448 {{{Decoration::Dot, 25},
449 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
450 },
451 [](Generate& generator) {
452 generator.setFlag(Generate::RegularStartEnd);
453 generator.setFlag(Generate::DisconnectShapes);
454 generator.generate(5, 5,
455 {{{Decoration::Poly | Decoration::Color::Yellow |
456 Decoration::Can_Rotate,
457 3}}});
458 },
459 [](Generate& generator) {
460 generator.setFlag(Generate::TreehouseLayout);
461 generator.generate(
462 4, 4,
463 {{{Decoration::Star | Decoration::Color::Black, 4},
464 {Decoration::Star | Decoration::Color::White, 4},
465 {Decoration::Star | Decoration::Color::Orange, 4},
466 {Decoration::Stone | Decoration::Color::Black, 1},
467 {Decoration::Stone | Decoration::Color::White, 1}}});
468 },
469 [](Generate& generator) {
470 generator.setFlag(Generate::RegularStartEnd);
471 generator.generate(
472 3, 3,
473 {{{Decoration::Stone | Decoration::Color::Magenta, 2},
474 {Decoration::Stone | Decoration::Color::Green, 1},
475 {Decoration::Star | Decoration::Color::Magenta, 2},
476 {Decoration::Star | Decoration::Color::Green, 3},
477 {Decoration::Eraser | Decoration::Color::Magenta, 1}}});
478 },
479 [](Generate& generator) {
480 generator.setFlag(Generate::RegularStartEnd);
481 generator.generate(
482 4, 4,
483 {{{Decoration::Dot_Intersection, 25},
484 {Decoration::Poly | Decoration::Color::Yellow, 3}}});
485 },
486 [](Generate& generator) {
487 generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2);
488 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
489 generator.generate(4, 4,
490 {{{Decoration::Dot_Intersection, 25},
491 {Decoration::Poly | Decoration::Color::Yellow |
492 Decoration::Can_Rotate,
493 2}}});
494 },
495 [](Generate& generator) {
496 generator.setFlag(Generate::RegularStartEnd);
497 generator.generate(
498 5, 5,
499 {{{Decoration::Poly | Decoration::Color::Green, 4},
500 {Decoration::Star | Decoration::Color::Green, 3}}});
501 },
502 [](Generate& generator) {
503 generator.setFlag(Generate::RegularStartEnd);
504 generator.generate(
505 4, 4, {{{Decoration::Triangle2 | Decoration::Color::Orange, 12}}});
506 },
507 [](Generate& generator) {
508 generator.setSymbol(Decoration::Exit, 0, 0);
509 generator.setSymbol(Decoration::Exit, 7 * 2, 0);
510 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2);
511 generator.generate(
512 7, 7,
513 {{{Decoration::Triangle | Decoration::Color::Orange, 12},
514 {Decoration::Start, 3}}});
515 },
516 [](Generate& generator) {
517 generator.setFlag(Generate::TreehouseLayout);
518 generator.generate(
519 4, 4,
520 {{{Decoration::Star | Decoration::Color::Orange, 1},
521 {Decoration::Triangle | Decoration::Color::Orange, 7}}});
522 },
523 [](Generate& generator) {
524 generator.setFlag(Generate::TreehouseLayout);
525 generator.generate(
526 4, 4,
527 {{{Decoration::Star | Decoration::Color::Orange, 3},
528 {Decoration::Star | Decoration::Color::Magenta, 2},
529 {Decoration::Triangle | Decoration::Color::Orange, 2},
530 {Decoration::Triangle | Decoration::Color::Magenta, 2}}});
531 },
532 [](Generate& generator) {
533 generator.setFlag(Generate::TreehouseLayout);
534 generator.generate(4, 4,
535 {{{Decoration::Star | Decoration::Color::Magenta, 4},
536 {Decoration::Dot_Intersection, 25}}});
537 },
538 [](Generate& generator) {
539 generator.setSymmetry(Panel::Symmetry::FlipNegXY);
540 generator.generate(7, 7,
541 {{{Decoration::Gap, 10},
542 {Decoration::Dot_Intersection, 8},
543 {Decoration::Start, 2},
544 {Decoration::Exit, 1}}});
545 },
546 [](Generate& generator) {
547 generator.setGridSize(7, 7);
548 generator.setSymmetry(Panel::Symmetry::ParallelV);
549 generator.generate(7, 7,
550 {{{Decoration::Gap, 12},
551 {Decoration::Dot_Intersection, 10},
552 {Decoration::Start, 2},
553 {Decoration::Exit, 1}}});
554 },
555 [](Generate& generator) {
556 generator.setGridSize(7, 7);
557 generator.setSymmetry(Panel::Symmetry::ParallelHFlip);
558 generator.generate(7, 7,
559 {{{Decoration::Gap, 12},
560 {Decoration::Dot_Intersection, 10},
561 {Decoration::Start, 2},
562 {Decoration::Exit, 1}}});
563 },
564 [](Generate& generator) {
565 generator.setFlag(Generate::StartEdgeOnly);
566 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
567 generator.generate(4, 4,
568 {{{Decoration::Dot_Intersection, 25},
569 {Decoration::Poly | Decoration::Color::Yellow, 1},
570 {Decoration::Poly | Decoration::Color::Yellow |
571 Decoration::Can_Rotate,
572 2},
573 {Decoration::Start, 1}}});
574 },
575 [](Generate& generator) {
576 generator.setFlag(Generate::RegularStartEnd);
577 generator.setSymmetry(Panel::Vertical);
578 generator.generate(
579 7, 7, {{{Decoration::Poly | Decoration::Color::Yellow, 5}}});
580 },
581 [](Generate& generator) {
582 generator.setFlag(Generate::TreehouseLayout);
583 generator.generate(
584 4, 4,
585 {{{Decoration::Star | Decoration::Color::Black, 1},
586 {Decoration::Star | Decoration::Color::White, 2},
587 {Decoration::Stone | Decoration::Color::Black, 2},
588 {Decoration::Stone | Decoration::Color::White, 1},
589 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Orange,
590 1},
591 {Decoration::Poly | Decoration::Orange, 1}}});
592 },
593 };
594
595 return generator_fns;
596}
diff --git a/ext/wittle_generator/PuzzlesetMedium.h b/ext/wittle_generator/PuzzlesetMedium.h new file mode 100644 index 0000000..d8f60c0 --- /dev/null +++ b/ext/wittle_generator/PuzzlesetMedium.h
@@ -0,0 +1,11 @@
1#ifndef PUZZLESET_MEDIUM_H_07C331F6
2#define PUZZLESET_MEDIUM_H_07C331F6
3
4#include <functional>
5#include <vector>
6
7class Generate;
8
9const std::vector<std::function<void(Generate&)>>& GetMediumPuzzles();
10
11#endif /* end of include guard: PUZZLESET_MEDIUM_H_07C331F6 */
diff --git a/ext/wittle_generator/Test.cpp b/ext/wittle_generator/Test.cpp index 8273da8..a1faba9 100644 --- a/ext/wittle_generator/Test.cpp +++ b/ext/wittle_generator/Test.cpp
@@ -1,19 +1,40 @@
1#include <functional>
2#include <iostream>
3#include <string_view>
4#include <vector>
5
1#include "Generate.h" 6#include "Generate.h"
7#include "PuzzlesetEasy.h"
8#include "PuzzlesetHard.h"
9#include "PuzzlesetMedium.h"
2 10
3int main(int, char**) { 11int main(int, char**) {
4 Generate generator; 12 const std::vector<std::function<void(Generate&)>>& easy_gens =
5 // generator.setFlag(Generate::RegularStartEnd); 13 GetEasyPuzzles();
6 /*generator.generate(4 * 2 + 1, 4 * 2 + 1, 14 for (size_t i = 0; i < easy_gens.size(); i++) {
7 {{{Decoration::Triangle | Decoration::Orange, 6}}});*/ 15 std::cout << "Generate EASY choice " << std::dec << i << ":" << std::endl;
8 // generator.setSymmetry(Panel::Vertical); 16
9 generator.setSymbol(Decoration::Exit, 0, 0); 17 Generate generator;
10 generator.setSymbol(Decoration::Exit, 7 * 2, 0); 18 easy_gens.at(i)(generator);
11 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2); 19 }
12 generator.generate(7 * 2 + 1, 7 * 2 + 1, 20
13 {{{Decoration::Stone | Decoration::Color::White, 10}, 21 const std::vector<std::function<void(Generate&)>>& medium_gens =
14 {Decoration::Stone | Decoration::Color::Black, 10}, 22 GetMediumPuzzles();
15 {Decoration::Dot, 10}, 23 for (size_t i = 0; i < medium_gens.size(); i++) {
16 {Decoration::Start, 2}}}); 24 std::cout << "Generate MEDIUM choice " << std::dec << i << ":" << std::endl;
25
26 Generate generator;
27 medium_gens.at(i)(generator);
28 }
29
30 const std::vector<std::function<void(Generate&)>>& hard_gens =
31 GetHardPuzzles();
32 for (size_t i = 0; i < hard_gens.size(); i++) {
33 std::cout << "Generate HARD choice " << std::dec << i << ":" << std::endl;
34
35 Generate generator;
36 hard_gens.at(i)(generator);
37 }
17 38
18 return 0; 39 return 0;
19} 40}
diff --git a/ext/wittle_generator/wittle_generator.cpp b/ext/wittle_generator/wittle_generator.cpp index 56f3d9d..5669592 100644 --- a/ext/wittle_generator/wittle_generator.cpp +++ b/ext/wittle_generator/wittle_generator.cpp
@@ -4,394 +4,14 @@
4#include <vector> 4#include <vector>
5 5
6#include "Generate.h" 6#include "Generate.h"
7#include "PuzzlesetEasy.h"
8#include "PuzzlesetHard.h"
9#include "PuzzlesetMedium.h"
7#include "Random.h" 10#include "Random.h"
8 11
9void MakeSecretSymmetryGrid(Generate& generator) {
10 for (int x : {0, 6, 8, 14}) {
11 for (int y : {0, 6, 8, 14}) {
12 generator.setSymbol(Decoration::Start, x, y);
13 }
14 }
15 for (int x : {0, 14}) {
16 for (int y : {2, 4, 10, 12}) {
17 generator.setSymbol(Decoration::Exit, x, y);
18 generator.setSymbol(Decoration::Exit, y, x);
19 }
20 }
21}
22
23Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) { 12Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) {
24 static std::vector<std::function<void(Generate&)>> generator_fns{ 13 const std::vector<std::function<void(Generate&)>>& generator_fns =
25 [](Generate& generator) { 14 GetEasyPuzzles();
26 generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2);
27 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
28 generator.generate(
29 4, 4, {{{Decoration::Dot_Intersection, 25}, {Decoration::Gap, 2}}});
30 },
31 [](Generate& generator) {
32 generator.setSymbol(Decoration::Start, 0, 4 * 2);
33 generator.generate(4, 4,
34 {{{Decoration::Stone | Decoration::Color::Black, 7},
35 {Decoration::Stone | Decoration::Color::White, 5},
36 {Decoration::Exit, 1}}});
37 },
38 [](Generate& generator) {
39 generator.setFlag(Generate::RegularStartEnd);
40 generator.setSymmetry(Panel::Rotational);
41 generator.generate(6, 6, {{{Decoration::Gap, 15}}});
42 },
43 [](Generate& generator) {
44 generator.setFlag(Generate::RegularStartEnd);
45 generator.setSymmetry(Panel::Vertical);
46 generator.generate(5, 8, {{{Decoration::Gap, 15}}});
47 },
48 [](Generate& generator) {
49 generator.setFlag(Generate::RegularStartEnd);
50 generator.setSymmetry(Panel::Horizontal);
51 generator.generate(5, 5, {{{Decoration::Dot, 7}}});
52 },
53 [](Generate& generator) {
54 generator.setFlag(Generate::RegularStartEnd);
55 generator.setSymmetry(Panel::Rotational);
56 generator.generate(5, 5, {{{Decoration::Dot, 6}}});
57 },
58 [](Generate& generator) {
59 generator.setFlag(Generate::RegularStartEnd);
60 generator.setSymmetry(Panel::Rotational);
61 generator.generate(5, 5,
62 {{{Decoration::Dot | Decoration::Color::Blue, 1},
63 {Decoration::Dot | Decoration::Color::Yellow, 2},
64 {Decoration::Dot, 4}}});
65 },
66 [](Generate& generator) {
67 generator.setFlag(Generate::RegularStartEnd);
68 generator.generate(
69 4, 4, {{{Decoration::Poly | Decoration::Color::Yellow, 2}}});
70 },
71 [](Generate& generator) {
72 generator.setFlag(Generate::FullGaps);
73 generator.setFlag(Generate::StartEdgeOnly);
74 generator.generate(5, 5,
75 {{{Decoration::Gap, 16},
76 {Decoration::Dot, 10},
77 {Decoration::Exit, 1},
78 {Decoration::Start, 1}}});
79 },
80 [](Generate& generator) {
81 generator.setFlag(Generate::RegularStartEnd);
82 generator.generate(3, 3,
83 {{{Decoration::Eraser | Decoration::Color::Green, 1},
84 {Decoration::Dot, 8}}});
85 },
86 [](Generate& generator) {
87 generator.setFlag(Generate::RegularStartEnd);
88 generator.generate(
89 4, 4,
90 {{{Decoration::Stone | Decoration::Color::White, 8},
91 {Decoration::Stone | Decoration::Color::Black, 4},
92 {Decoration::Eraser | Decoration::Color::Green, 1}}});
93 },
94 [](Generate& generator) {
95 generator.setFlag(Generate::RegularStartEnd);
96 generator.generate(
97 4, 4,
98 {{{Decoration::Stone | Decoration::Color::Red, 4},
99 {Decoration::Stone | Decoration::Color::White, 4},
100 {Decoration::Stone | Decoration::Color::Black, 3},
101 {Decoration::Eraser | Decoration::Color::Green, 1}}});
102 },
103 [](Generate& generator) {
104 generator.setFlag(Generate::RegularStartEnd);
105 generator.setFlag(Generate::RequireCombineShapes);
106 generator.generate(4, 4,
107 {{{Decoration::Poly | Decoration::Color::Yellow, 1},
108 {Decoration::Poly | Decoration::Color::Yellow |
109 Decoration::Can_Rotate,
110 1},
111 {Decoration::Gap, 5}}});
112 },
113 [](Generate& generator) {
114 generator.setFlag(Generate::RegularStartEnd);
115 generator.generate(
116 3, 3,
117 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
118 {Decoration::Eraser | Decoration::Color::White, 1}}});
119 },
120 [](Generate& generator) {
121 generator.setFlag(Generate::FullGaps);
122 generator.generate(4, 4,
123 {{{Decoration::Gap, 8},
124 {Decoration::Dot_Intersection, 10},
125 {Decoration::Exit, 1},
126 {Decoration::Start, 3}}});
127 },
128 [](Generate& generator) {
129 generator.generate(5, 5,
130 {{{Decoration::Exit, 1},
131 {Decoration::Stone | Decoration::Color::Black, 11},
132 {Decoration::Stone | Decoration::Color::White, 8},
133 {Decoration::Start, 3}}});
134 },
135 [](Generate& generator) {
136 generator.setFlag(Generate::RegularStartEnd);
137 generator.generate(4, 4,
138 {{{Decoration::Star | Decoration::Color::Green, 6},
139 {Decoration::Star | Decoration::Color::Orange, 5},
140 {Decoration::Eraser | Decoration::Orange, 1}}});
141 },
142 [](Generate& generator) {
143 generator.setFlag(Generate::RegularStartEnd);
144 generator.generate(4, 4,
145 {{{Decoration::Star | Decoration::Color::Orange, 6},
146 {Decoration::Star | Decoration::Color::Magenta, 5},
147 {Decoration::Star | Decoration::Color::Green, 4},
148 {Decoration::Eraser | Decoration::Magenta, 1}}});
149 },
150 [](Generate& generator) {
151 generator.setFlag(Generate::RegularStartEnd);
152 generator.generate(4, 4,
153 {{{Decoration::Star | Decoration::Color::Magenta, 6},
154 {Decoration::Poly | Decoration::Color::Yellow, 2},
155 {Decoration::Eraser | Decoration::White, 1}}});
156 },
157 [](Generate& generator) {
158 generator.setFlag(Generate::RegularStartEnd);
159 generator.generate(4, 4,
160 {{{Decoration::Star | Decoration::Color::Magenta, 5},
161 {Decoration::Poly | Decoration::Color::Yellow, 2},
162 {Decoration::Eraser | Decoration::White, 1}}});
163 },
164 [](Generate& generator) {
165 generator.setFlag(Generate::TreehouseLayout);
166 generator.generate(4, 4,
167 {{{Decoration::Star | Decoration::Color::Orange, 4},
168 {Decoration::Gap, 10}}});
169 },
170 [](Generate& generator) {
171 generator.setFlag(Generate::RegularStartEnd);
172 generator.generate(5, 5,
173 {{{Decoration::Star | Decoration::Color::Orange, 10},
174 {Decoration::Gap, 3}}});
175 },
176 [](Generate& generator) {
177 generator.setFlag(Generate::TreehouseLayout);
178 generator.generate(4, 4,
179 {{{Decoration::Star | Decoration::Color::Orange, 4},
180 {Decoration::Star | Decoration::Color::Magenta, 4},
181 {Decoration::Gap, 8}}});
182 },
183 [](Generate& generator) {
184 generator.setFlag(Generate::TreehouseLayout);
185 generator.generate(4, 4,
186 {{{Decoration::Star | Decoration::Color::Orange, 4},
187 {Decoration::Star | Decoration::Color::Magenta, 2},
188 {Decoration::Star | Decoration::Color::Green, 2},
189 {Decoration::Gap, 8}}});
190 },
191 [](Generate& generator) {
192 generator.setFlag(Generate::TreehouseLayout);
193 generator.generate(
194 4, 3,
195 {{{Decoration::Star | Decoration::Color::Orange, 6},
196 {Decoration::Star | Decoration::Color::Magenta, 4},
197 {Decoration::Star | Decoration::Color::Green, 2}}});
198 },
199 [](Generate& generator) {
200 generator.setFlag(Generate::TreehouseLayout);
201 generator.setFlag(Generate::FullGaps);
202 generator.generate(4, 4,
203 {{{Decoration::Star | Decoration::Color::Magenta, 6},
204 {Decoration::Dot_Intersection, 6},
205 {Decoration::Gap, 3}}});
206 },
207 [](Generate& generator) {
208 generator.setFlag(Generate::TreehouseLayout);
209 generator.generate(
210 4, 4,
211 {{{Decoration::Star | Decoration::Color::Magenta, 4},
212 {Decoration::Stone | Decoration::Color::Black, 4},
213 {Decoration::Stone | Decoration::Color::White, 4}}});
214 },
215 [](Generate& generator) {
216 generator.setFlag(Generate::TreehouseLayout);
217 generator.generate(
218 3, 3,
219 {{{Decoration::Star | Decoration::Color::Black, 1},
220 {Decoration::Stone | Decoration::Color::Black, 2},
221 {Decoration::Stone | Decoration::Color::White, 2}}});
222 },
223 [](Generate& generator) {
224 generator.setFlag(Generate::TreehouseLayout);
225 generator.generate(
226 4, 4,
227 {{{Decoration::Star | Decoration::Color::White, 2},
228 {Decoration::Stone | Decoration::Color::Black, 2},
229 {Decoration::Stone | Decoration::Color::White, 2},
230 {Decoration::Stone | Decoration::Color::Purple, 2}}});
231 },
232 [](Generate& generator) {
233 generator.setFlag(Generate::TreehouseLayout);
234 generator.generate(
235 4, 4,
236 {{{Decoration::Poly | Decoration::Color::Orange, 2},
237 {Decoration::Star | Decoration::Color::Magenta, 4}}});
238 },
239 [](Generate& generator) {
240 generator.setFlag(Generate::TreehouseLayout);
241 generator.generate(
242 4, 5,
243 {{{Decoration::Stone | Decoration::Color::White, 8},
244 {Decoration::Stone | Decoration::Color::Black, 8},
245 {Decoration::Eraser | Decoration::Color::White, 2}}});
246 },
247 [](Generate& generator) {
248 generator.setFlag(Generate::TreehouseLayout);
249 generator.generate(4, 5,
250 {{{Decoration::Poly | Decoration::Color::Orange, 2},
251 {Decoration::Stone | Decoration::Color::White, 4},
252 {Decoration::Stone | Decoration::Color::Black, 4},
253 {Decoration::Gap, 4}}});
254 },
255 [](Generate& generator) {
256 generator.setFlag(Generate::RegularStartEnd);
257 generator.generate(
258 4, 4,
259 {{{Decoration::Dot_Intersection, 25},
260 {Decoration::Poly | Decoration::Color::Yellow, 2}}});
261 },
262 [](Generate& generator) {
263 generator.setFlag(Generate::RegularStartEnd);
264 generator.generate(
265 4, 4,
266 {{{Decoration::Dot_Intersection, 25},
267 {Decoration::Poly | Decoration::Color::Yellow |
268 Decoration::Can_Rotate,
269 2},
270 {Decoration::Eraser | Decoration::Color::White, 1}}});
271 },
272 [](Generate& generator) {
273 generator.setFlag(Generate::RegularStartEnd);
274 generator.setSymmetry(Panel::Rotational);
275 generator.generate(
276 5, 5,
277 {{{Decoration::Stone | Decoration::Color::Black, 6},
278 {Decoration::Stone | Decoration::Color::White, 6}}});
279 },
280 [](Generate& generator) {
281 generator.setFlag(Generate::RegularStartEnd);
282 generator.setSymmetry(Panel::Rotational);
283 generator.generate(5, 5,
284 {{{Decoration::Stone | Decoration::Color::Black, 5},
285 {Decoration::Stone | Decoration::Color::White, 5},
286 {Decoration::Dot, 3}}});
287 },
288 [](Generate& generator) {
289 generator.setFlag(Generate::RegularStartEnd);
290 generator.setFlag(Generate::SplitShapes);
291 generator.generate(4, 4,
292 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
293 {Decoration::Gap, 8}}});
294 },
295 [](Generate& generator) {
296 generator.setFlag(Generate::RegularStartEnd);
297 generator.setFlag(Generate::BigShapes);
298 generator.generate(5, 5,
299 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
300 {Decoration::Gap, 12}}});
301 },
302 [](Generate& generator) {
303 generator.setFlag(Generate::RegularStartEnd);
304 generator.setFlag(Generate::DisconnectShapes);
305 generator.generate(
306 3, 3, {{{Decoration::Poly | Decoration::Color::Yellow, 2}}});
307 },
308 [](Generate& generator) {
309 generator.setFlag(Generate::RegularStartEnd);
310 generator.setFlag(Generate::DisconnectShapes);
311 generator.setFlag(Generate::BigShapes);
312 generator.generate(
313 4, 4, {{{Decoration::Poly | Decoration::Color::Yellow, 2}}});
314 },
315 [](Generate& generator) {
316 generator.setFlag(Generate::RegularStartEnd);
317 generator.setFlag(Generate::RequireCombineShapes);
318 generator.setFlag(Generate::DisableCancelShapes);
319 generator.generate(3, 3,
320 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
321 {Decoration::Poly | Decoration::Negative |
322 Decoration::Color::Blue,
323 1}}});
324 },
325 [](Generate& generator) {
326 generator.setFlag(Generate::RegularStartEnd);
327 generator.setFlag(Generate::RequireCombineShapes);
328 generator.setFlag(Generate::DisableCancelShapes);
329 generator.generate(4, 4,
330 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
331 {Decoration::Poly | Decoration::Negative |
332 Decoration::Color::Blue,
333 1}}});
334 },
335 [](Generate& generator) {
336 generator.setFlag(Generate::RegularStartEnd);
337 generator.setFlag(Generate::BigShapes);
338 generator.setFlag(Generate::DisableCancelShapes);
339 generator.generate(4, 4,
340 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
341 {Decoration::Poly | Decoration::Negative |
342 Decoration::Color::Blue,
343 1}}});
344 },
345 [](Generate& generator) {
346 generator.setFlag(Generate::RegularStartEnd);
347 generator.setFlag(Generate::RequireCancelShapes);
348 generator.generate(4, 4,
349 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
350 {Decoration::Poly | Decoration::Negative |
351 Decoration::Color::Blue,
352 2}}});
353 },
354 [](Generate& generator) {
355 generator.setFlag(Generate::RegularStartEnd);
356 generator.generate(
357 4, 4, {{{Decoration::Triangle | Decoration::Color::Orange, 6}}});
358 },
359 [](Generate& generator) {
360 generator.setFlag(Generate::TreehouseLayout);
361 generator.setFlag(Generate::LongPath);
362 generator.generate(
363 5, 4,
364 {{{Decoration::Star | Decoration::Color::Magenta, 6},
365 {Decoration::Stone | Decoration::Color::Orange, 4},
366 {Decoration::Stone | Decoration::Color::Green, 4}}});
367 },
368 [](Generate& generator) {
369 generator.setFlag(Generate::RegularStartEnd);
370 generator.generate(
371 4, 4,
372 {{{Decoration::Dot, 6},
373 {Decoration::Stone | Decoration::Color::Black, 3},
374 {Decoration::Stone | Decoration::Color::White, 3}}});
375 },
376 [](Generate& generator) {
377 generator.setFlag(Generate::RegularStartEnd);
378 generator.generate(
379 4, 4,
380 {{{Decoration::Dot, 4},
381 {Decoration::Stone | Decoration::Color::Black, 3},
382 {Decoration::Stone | Decoration::Color::White, 2},
383 {Decoration::Poly | Decoration::Color::Yellow, 1}}});
384 },
385 [](Generate& generator) {
386 generator.setSymmetry(Panel::Rotational);
387 generator.generate(5, 5,
388 {{{Decoration::Dot | Decoration::Color::Blue, 2},
389 {Decoration::Dot | Decoration::Color::Yellow, 2},
390 {Decoration::Dot, 4},
391 {Decoration::Start, 2},
392 {Decoration::Exit, 1}}});
393 },
394 };
395 15
396 Generate generator; 16 Generate generator;
397 17
@@ -405,594 +25,8 @@ Rice::Object wittle_generator_generate_easy(Rice::Object /* self */) {
405} 25}
406 26
407Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) { 27Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) {
408 static std::vector<std::function<void(Generate&)>> generator_fns{ 28 const std::vector<std::function<void(Generate&)>>& generator_fns =
409 [](Generate& generator) { 29 GetMediumPuzzles();
410 generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2);
411 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
412 generator.generate(
413 4, 4,
414 {{{Decoration::Stone | Decoration::Color::White, 5},
415 {Decoration::Stone | Decoration::Color::Black, 5},
416 {Decoration::Dot, 4},
417 {Decoration::Eraser | Decoration::Color::Green, 1}}});
418 },
419 [](Generate& generator) {
420 generator.setSymbol(Decoration::Exit, 0, 0);
421 generator.setSymbol(Decoration::Exit, 7 * 2, 0);
422 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2);
423 generator.generate(7, 7,
424 {{{Decoration::Stone | Decoration::Color::White, 10},
425 {Decoration::Stone | Decoration::Color::Black, 10},
426 {Decoration::Dot, 10},
427 {Decoration::Start, 4}}});
428 },
429 [](Generate& generator) {
430 generator.setSymbol(Decoration::Exit, 0, 0);
431 generator.setSymbol(Decoration::Exit, 7 * 2, 0);
432 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2);
433 generator.generate(
434 7, 7,
435 {{{Decoration::Stone | Decoration::Color::White, 10},
436 {Decoration::Stone | Decoration::Color::Black, 10},
437 {Decoration::Dot, 10},
438 {Decoration::Eraser | Decoration::Color::Purple, 1},
439 {Decoration::Start, 3}}});
440 },
441 [](Generate& generator) {
442 generator.setFlag(Generate::RegularStartEnd);
443 generator.generate(5, 5,
444 {{{Decoration::Star | Decoration::White, 8},
445 {Decoration::Star | Decoration::Black, 6}}});
446 },
447 [](Generate& generator) {
448 generator.setFlag(Generate::RegularStartEnd);
449 generator.setFlag(Generate::DisconnectShapes);
450 generator.generate(
451 4, 4,
452 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
453 {Decoration::Eraser | Decoration::Color::White, 1}}});
454 },
455 [](Generate& generator) {
456 generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2);
457 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
458 generator.generate(
459 4, 4,
460 {{{Decoration::Dot_Intersection, 25},
461 {Decoration::Stone | Decoration::Color::Black, 2},
462 {Decoration::Stone | Decoration::Color::White, 2}}});
463 },
464 [](Generate& generator) {
465 generator.setFlag(Generate::RegularStartEnd);
466 generator.setFlag(Generate::RequireCancelShapes);
467 generator.generate(6, 6,
468 {{{Decoration::Dot_Intersection, 49},
469 {Decoration::Poly | Decoration::Color::Yellow, 1},
470 {Decoration::Poly | Decoration::Color::Yellow |
471 Decoration::Can_Rotate,
472 2},
473 {Decoration::Poly | Decoration::Color::Blue |
474 Decoration::Negative,
475 3}}});
476 },
477 [](Generate& generator) {
478 generator.setFlag(Generate::RegularStartEnd);
479 generator.generate(
480 4, 4,
481 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
482 {Decoration::Eraser | Decoration::Color::White, 1}}});
483 },
484 [](Generate& generator) {
485 generator.setSymbol(Decoration::Start, 0, 3 * 2);
486 generator.setSymbol(Decoration::Exit, 6 * 2, 3 * 2);
487 generator.generate(6, 3,
488 {{{Decoration::Star | Decoration::Color::Magenta, 3},
489 {Decoration::Poly | Decoration::Color::Yellow, 3},
490 {Decoration::Eraser | Decoration::White, 1}}});
491 },
492 [](Generate& generator) {
493 generator.setSymbol(Decoration::Start, 0, 3 * 2);
494 generator.setSymbol(Decoration::Exit, 6 * 2, 3 * 2);
495 generator.generate(6, 3,
496 {{{Decoration::Star | Decoration::Color::Magenta, 5},
497 {Decoration::Poly | Decoration::Color::Yellow, 3},
498 {Decoration::Eraser | Decoration::White, 1}}});
499 },
500 [](Generate& generator) {
501 generator.setSymbol(Decoration::Start, 0, 3 * 2);
502 generator.setSymbol(Decoration::Exit, 6 * 2, 3 * 2);
503 generator.generate(6, 3,
504 {{{Decoration::Star | Decoration::Color::Magenta, 6},
505 {Decoration::Poly | Decoration::Color::Yellow, 3},
506 {Decoration::Eraser | Decoration::White, 1}}});
507 },
508 [](Generate& generator) {
509 generator.setSymbol(Decoration::Start, 0, 3 * 2);
510 generator.setSymbol(Decoration::Exit, 7 * 2, 3 * 2);
511 generator.generate(7, 3,
512 {{{Decoration::Star | Decoration::Color::Magenta, 5},
513 {Decoration::Poly | Decoration::Color::Yellow, 3},
514 {Decoration::Eraser | Decoration::White, 1}}});
515 },
516 [](Generate& generator) {
517 generator.setFlag(Generate::TreehouseLayout);
518 generator.generate(
519 4, 4,
520 {{{Decoration::Star | Decoration::Color::Orange, 6},
521 {Decoration::Star | Decoration::Color::Magenta, 6},
522 {Decoration::Star | Decoration::Color::Green, 4}}});
523 },
524 [](Generate& generator) {
525 generator.setFlag(Generate::TreehouseLayout);
526 generator.setFlag(Generate::FullGaps);
527 generator.generate(5, 5,
528 {{{Decoration::Star | Decoration::Color::Magenta, 8},
529 {Decoration::Dot_Intersection, 9},
530 {Decoration::Gap, 5}}});
531 },
532 [](Generate& generator) {
533 generator.setFlag(Generate::TreehouseLayout);
534 generator.generate(
535 4, 4,
536 {{{Decoration::Star | Decoration::Color::Black, 4},
537 {Decoration::Star | Decoration::Color::White, 4},
538 {Decoration::Stone | Decoration::Color::Black, 2},
539 {Decoration::Stone | Decoration::Color::White, 2}}});
540 },
541 [](Generate& generator) {
542 generator.setFlag(Generate::TreehouseLayout);
543 generator.generate(
544 5, 5,
545 {{{Decoration::Poly | Decoration::Color::Orange, 2},
546 {Decoration::Poly | Decoration::Color::Magenta, 1},
547 {Decoration::Star | Decoration::Color::Magenta, 3}}});
548 },
549 [](Generate& generator) {
550 generator.setFlag(Generate::TreehouseLayout);
551 generator.setFlag(Generate::RequireCombineShapes);
552 generator.generate(
553 5, 5,
554 {{{Decoration::Poly | Decoration::Color::Orange, 1},
555 {Decoration::Poly | Decoration::Can_Rotate |
556 Decoration::Color::Orange,
557 1},
558 {Decoration::Star | Decoration::Color::Magenta, 4},
559 {Decoration::Star | Decoration::Color::Green, 4}}});
560 },
561 [](Generate& generator) {
562 generator.setFlag(Generate::RegularStartEnd);
563 generator.generate(
564 4, 4,
565 {{{Decoration::Poly | Decoration::Color::Orange, 3},
566 {Decoration::Stone | Decoration::Color::White, 2},
567 {Decoration::Stone | Decoration::Color::Black, 2}}});
568 },
569 [](Generate& generator) {
570 generator.setFlag(Generate::RegularStartEnd);
571 generator.generate(4, 4,
572 {{{Decoration::Dot_Intersection, 25},
573 {Decoration::Poly | Decoration::Can_Rotate |
574 Decoration::Color::Yellow,
575 2}}});
576 },
577 [](Generate& generator) {
578 generator.setFlag(Generate::RegularStartEnd);
579 generator.setFlag(Generate::SmallShapes);
580 generator.generate(
581 5, 5,
582 {{{Decoration::Poly | Decoration::Can_Rotate |
583 Decoration::Color::Yellow,
584 4},
585 {Decoration::Star | Decoration::Color::Orange, 6}}});
586 },
587 [](Generate& generator) {
588 generator.setFlag(Generate::RegularStartEnd);
589 generator.generate(5, 5,
590 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
591 {Decoration::Gap, 5}}});
592 },
593 [](Generate& generator) {
594 generator.setFlag(Generate::RegularStartEnd);
595 generator.generate(
596 5, 5, {{{Decoration::Poly | Decoration::Color::Yellow, 4}}});
597 },
598 [](Generate& generator) {
599 generator.setFlag(Generate::RegularStartEnd);
600 generator.setFlag(Generate::DisconnectShapes);
601 generator.generate(
602 4, 4, {{{Decoration::Poly | Decoration::Color::Yellow, 3}}});
603 },
604 [](Generate& generator) {
605 generator.setFlag(Generate::RegularStartEnd);
606 generator.generate(5, 5,
607 {{{Decoration::Poly | Decoration::Can_Rotate |
608 Decoration::Color::Yellow,
609 2},
610 {Decoration::Poly | Decoration::Color::Yellow, 1},
611 {Decoration::Gap, 2}}});
612 },
613 [](Generate& generator) {
614 generator.setFlag(Generate::RegularStartEnd);
615 generator.setFlag(Generate::BigShapes);
616 generator.generate(5, 5,
617 {{{Decoration::Poly | Decoration::Can_Rotate |
618 Decoration::Color::Yellow,
619 3}}});
620 },
621 [](Generate& generator) {
622 generator.setFlag(Generate::RegularStartEnd);
623 generator.generate(
624 5, 6, {{{Decoration::Poly | Decoration::Color::Yellow, 5}}});
625 },
626 [](Generate& generator) {
627 generator.setFlag(Generate::RegularStartEnd);
628 generator.setFlag(Generate::BigShapes);
629 generator.generate(4, 4,
630 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
631 {Decoration::Poly | Decoration::Negative |
632 Decoration::Color::Blue,
633 2}}});
634 },
635 [](Generate& generator) {
636 generator.setFlag(Generate::RegularStartEnd);
637 generator.generate(4, 4,
638 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
639 {Decoration::Poly | Decoration::Negative |
640 Decoration::Color::Blue,
641 2}}});
642 },
643 [](Generate& generator) {
644 generator.setFlag(Generate::RegularStartEnd);
645 generator.generate(
646 4, 4, {{{Decoration::Triangle | Decoration::Color::Orange, 8}}});
647 },
648 [](Generate& generator) {
649 generator.setFlag(Generate::RegularStartEnd);
650 generator.setFlag(Generate::LongestPath);
651 generator.setFlag(Generate::FullGaps);
652 generator.generate(
653 6, 6,
654 {{{Decoration::Dot_Intersection, 12}, {Decoration::Gap, 18}}});
655 },
656 [](Generate& generator) {
657 generator.generate(5, 5,
658 {{{Decoration::Start, 8},
659 {Decoration::Exit, 1},
660 {Decoration::Dot_Intersection, 36}}});
661 },
662 [](Generate& generator) {
663 generator.setFlag(Generate::RegularStartEnd);
664 generator.setSymmetry(Panel::Horizontal);
665 generator.generate(
666 6, 6,
667 {{{Decoration::Triangle | Decoration::Color::Orange, 12},
668 {Decoration::Start, 1},
669 {Decoration::Exit, 1}}});
670 },
671 [](Generate& generator) {
672 generator.setFlag(Generate::RegularStartEnd);
673 generator.generate(
674 4, 4,
675 {{{Decoration::Dot, 4},
676 {Decoration::Stone | Decoration::Color::Black, 2},
677 {Decoration::Stone | Decoration::Color::White, 2},
678 {Decoration::Star | Decoration::Color::Black, 2},
679 {Decoration::Star | Decoration::Color::White, 2}}});
680 },
681 [](Generate& generator) {
682 generator.setFlag(Generate::RegularStartEnd);
683 generator.generate(
684 4, 4,
685 {{{Decoration::Dot, 4},
686 {Decoration::Stone | Decoration::Color::Black, 1},
687 {Decoration::Stone | Decoration::Color::White, 3},
688 {Decoration::Star | Decoration::Color::Black, 3},
689 {Decoration::Star | Decoration::Color::White, 1}}});
690 },
691 [](Generate& generator) {
692 generator.setFlag(Generate::RegularStartEnd);
693 generator.generate(
694 5, 5,
695 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
696 {Decoration::Stone | Decoration::Color::Black, 4},
697 {Decoration::Stone | Decoration::Color::White, 4}}});
698 },
699 [](Generate& generator) {
700 generator.setFlag(Generate::RegularStartEnd);
701 generator.generate(
702 5, 5,
703 {{{Decoration::Stone | Decoration::Color::Cyan, 2},
704 {Decoration::Stone | Decoration::Color::Yellow, 2},
705 {Decoration::Star | Decoration::Color::Cyan, 3},
706 {Decoration::Star | Decoration::Color::Yellow, 3}}});
707 },
708 [](Generate& generator) {
709 generator.setFlag(Generate::RegularStartEnd);
710 generator.generate(
711 6, 6,
712 {{{Decoration::Stone | Decoration::Color::Cyan, 2},
713 {Decoration::Stone | Decoration::Color::Magenta, 2},
714 {Decoration::Star | Decoration::Color::Cyan, 2},
715 {Decoration::Star | Decoration::Color::Magenta, 1},
716 {Decoration::Poly | Decoration::Color::Cyan, 1},
717 {Decoration::Poly | Decoration::Color::Magenta, 1}}});
718 },
719 [](Generate& generator) {
720 generator.setFlag(Generate::RegularStartEnd);
721 generator.generate(
722 5, 5, {{{Decoration::Triangle | Decoration::Color::Orange, 10}}});
723 },
724 [](Generate& generator) {
725 generator.setFlag(Generate::RegularStartEnd);
726 generator.generate(
727 5, 3,
728 {{{Decoration::Stone | Decoration::Color::Black, 4},
729 {Decoration::Stone | Decoration::Color::White, 3},
730 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
731 },
732 [](Generate& generator) {
733 generator.setFlag(Generate::RegularStartEnd);
734 generator.generate(
735 4, 4,
736 {{{Decoration::Dot, 25},
737 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
738 },
739 [](Generate& generator) {
740 generator.setFlag(Generate::RegularStartEnd);
741 generator.setFlag(Generate::RequireCombineShapes);
742 generator.setSymmetry(Panel::Rotational);
743 generator.generate(
744 5, 5, {{{Decoration::Poly | Decoration::Color::Yellow, 3}}});
745 },
746 [](Generate& generator) {
747 generator.setFlag(Generate::RegularStartEnd);
748 generator.setFlag(Generate::DisconnectShapes);
749 generator.setFlag(Generate::BigShapes);
750 generator.generate(
751 5, 5, {{{Decoration::Poly | Decoration::Color::Yellow, 3}}});
752 },
753 [](Generate& generator) {
754 generator.setFlag(Generate::RegularStartEnd);
755 generator.setFlag(Generate::DisconnectShapes);
756 generator.generate(4, 4,
757 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
758 {Decoration::Poly | Decoration::Color::Blue |
759 Decoration::Negative,
760 1}}});
761 },
762 [](Generate& generator) {
763 generator.setFlag(Generate::RegularStartEnd);
764 generator.generate(
765 4, 4,
766 {{{Decoration::Stone | Decoration::Color::Black, 3},
767 {Decoration::Stone | Decoration::Color::White, 3},
768 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
769 },
770 [](Generate& generator) {
771 generator.setFlag(Generate::RegularStartEnd);
772 generator.generate(
773 4, 4,
774 {{{Decoration::Star | Decoration::Color::Black, 4},
775 {Decoration::Star | Decoration::Color::White, 4},
776 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
777 },
778 [](Generate& generator) {
779 generator.setFlag(Generate::RegularStartEnd);
780 generator.generate(
781 4, 4,
782 {{{Decoration::Star | Decoration::Color::Orange, 3},
783 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
784 },
785 [](Generate& generator) {
786 generator.setFlag(Generate::RegularStartEnd);
787 generator.generate(
788 4, 4,
789 {{{Decoration::Star | Decoration::Color::Black, 2},
790 {Decoration::Star | Decoration::Color::Orange, 2},
791 {Decoration::Stone | Decoration::Color::Black, 1},
792 {Decoration::Stone | Decoration::Color::Orange, 1},
793 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
794 },
795 [](Generate& generator) {
796 generator.setFlag(Generate::RegularStartEnd);
797 generator.setFlag(Generate::BigShapes);
798 generator.generate(
799 4, 4,
800 {{{Decoration::Poly | Decoration::Color::Yellow |
801 Decoration::Can_Rotate,
802 1},
803 {Decoration::Triangle | Decoration::Color::Orange, 3}}});
804 },
805 [](Generate& generator) {
806 generator.setFlag(Generate::RegularStartEnd);
807 generator.setFlag(Generate::BigShapes);
808 generator.generate(
809 5, 5,
810 {{{Decoration::Poly | Decoration::Color::Yellow |
811 Decoration::Can_Rotate,
812 1},
813 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
814 },
815 [](Generate& generator) {
816 generator.setFlag(Generate::RegularStartEnd);
817 generator.setFlag(Generate::BigShapes);
818 generator.generate(
819 5, 5,
820 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
821 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
822 },
823 [](Generate& generator) {
824 generator.setFlag(Generate::RegularStartEnd);
825 generator.generate(
826 4, 4,
827 {{{Decoration::Dot, 25},
828 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
829 },
830 [](Generate& generator) {
831 generator.setSymbol(Decoration::Start, 0, 4 * 2);
832 generator.setSymbol(Decoration::Exit, 0, 0);
833 generator.generate(
834 4, 4,
835 {{{Decoration::Dot, 25},
836 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
837 },
838 [](Generate& generator) {
839 generator.setSymbol(Decoration::Start, 0, 4 * 2);
840 generator.setSymbol(Decoration::Exit, 4 * 2, 4 * 2);
841 generator.generate(
842 4, 4,
843 {{{Decoration::Dot, 25},
844 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
845 },
846 [](Generate& generator) {
847 generator.setFlag(Generate::RegularStartEnd);
848 generator.generate(
849 4, 4,
850 {{{Decoration::Dot, 25},
851 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
852 },
853 [](Generate& generator) {
854 generator.setFlag(Generate::RegularStartEnd);
855 generator.setFlag(Generate::DisconnectShapes);
856 generator.generate(5, 5,
857 {{{Decoration::Poly | Decoration::Color::Yellow |
858 Decoration::Can_Rotate,
859 3}}});
860 },
861 [](Generate& generator) {
862 generator.setFlag(Generate::TreehouseLayout);
863 generator.generate(
864 4, 4,
865 {{{Decoration::Star | Decoration::Color::Black, 4},
866 {Decoration::Star | Decoration::Color::White, 4},
867 {Decoration::Star | Decoration::Color::Orange, 4},
868 {Decoration::Stone | Decoration::Color::Black, 1},
869 {Decoration::Stone | Decoration::Color::White, 1}}});
870 },
871 [](Generate& generator) {
872 generator.setFlag(Generate::RegularStartEnd);
873 generator.generate(
874 3, 3,
875 {{{Decoration::Stone | Decoration::Color::Magenta, 2},
876 {Decoration::Stone | Decoration::Color::Green, 1},
877 {Decoration::Star | Decoration::Color::Magenta, 2},
878 {Decoration::Star | Decoration::Color::Green, 3},
879 {Decoration::Eraser | Decoration::Color::Magenta, 1}}});
880 },
881 [](Generate& generator) {
882 generator.setFlag(Generate::RegularStartEnd);
883 generator.generate(
884 4, 4,
885 {{{Decoration::Dot_Intersection, 25},
886 {Decoration::Poly | Decoration::Color::Yellow, 3}}});
887 },
888 [](Generate& generator) {
889 generator.setSymbol(Decoration::Start, 2 * 2, 2 * 2);
890 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
891 generator.generate(4, 4,
892 {{{Decoration::Dot_Intersection, 25},
893 {Decoration::Poly | Decoration::Color::Yellow |
894 Decoration::Can_Rotate,
895 2}}});
896 },
897 [](Generate& generator) {
898 generator.setFlag(Generate::RegularStartEnd);
899 generator.generate(
900 5, 5,
901 {{{Decoration::Poly | Decoration::Color::Green, 4},
902 {Decoration::Star | Decoration::Color::Green, 3}}});
903 },
904 [](Generate& generator) {
905 generator.setFlag(Generate::RegularStartEnd);
906 generator.generate(
907 4, 4, {{{Decoration::Triangle2 | Decoration::Color::Orange, 12}}});
908 },
909 [](Generate& generator) {
910 generator.setSymbol(Decoration::Exit, 0, 0);
911 generator.setSymbol(Decoration::Exit, 7 * 2, 0);
912 generator.setSymbol(Decoration::Exit, 7 * 2, 7 * 2);
913 generator.generate(
914 7, 7,
915 {{{Decoration::Triangle | Decoration::Color::Orange, 12},
916 {Decoration::Start, 3}}});
917 },
918 [](Generate& generator) {
919 generator.setFlag(Generate::TreehouseLayout);
920 generator.generate(
921 4, 4,
922 {{{Decoration::Star | Decoration::Color::Orange, 1},
923 {Decoration::Triangle | Decoration::Color::Orange, 7}}});
924 },
925 [](Generate& generator) {
926 generator.setFlag(Generate::TreehouseLayout);
927 generator.generate(
928 4, 4,
929 {{{Decoration::Star | Decoration::Color::Orange, 3},
930 {Decoration::Star | Decoration::Color::Magenta, 2},
931 {Decoration::Triangle | Decoration::Color::Orange, 2},
932 {Decoration::Triangle | Decoration::Color::Magenta, 2}}});
933 },
934 [](Generate& generator) {
935 generator.setFlag(Generate::TreehouseLayout);
936 generator.generate(4, 4,
937 {{{Decoration::Star | Decoration::Color::Magenta, 4},
938 {Decoration::Dot_Intersection, 25}}});
939 },
940 [](Generate& generator) {
941 generator.setSymmetry(Panel::Symmetry::FlipNegXY);
942 generator.generate(7, 7,
943 {{{Decoration::Gap, 10},
944 {Decoration::Dot_Intersection, 8},
945 {Decoration::Start, 2},
946 {Decoration::Exit, 1}}});
947 },
948 [](Generate& generator) {
949 generator.setGridSize(7, 7);
950 generator.setSymmetry(Panel::Symmetry::ParallelV);
951 generator.generate(7, 7,
952 {{{Decoration::Gap, 12},
953 {Decoration::Dot_Intersection, 10},
954 {Decoration::Start, 2},
955 {Decoration::Exit, 1}}});
956 },
957 [](Generate& generator) {
958 generator.setGridSize(7, 7);
959 generator.setSymmetry(Panel::Symmetry::ParallelHFlip);
960 generator.generate(7, 7,
961 {{{Decoration::Gap, 12},
962 {Decoration::Dot_Intersection, 10},
963 {Decoration::Start, 2},
964 {Decoration::Exit, 1}}});
965 },
966 [](Generate& generator) {
967 generator.setFlag(Generate::StartEdgeOnly);
968 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
969 generator.generate(4, 4,
970 {{{Decoration::Dot_Intersection, 25},
971 {Decoration::Poly | Decoration::Color::Yellow, 1},
972 {Decoration::Poly | Decoration::Color::Yellow |
973 Decoration::Can_Rotate,
974 2},
975 {Decoration::Start, 1}}});
976 },
977 [](Generate& generator) {
978 generator.setFlag(Generate::RegularStartEnd);
979 generator.setSymmetry(Panel::Vertical);
980 generator.generate(
981 7, 7, {{{Decoration::Poly | Decoration::Color::Yellow, 5}}});
982 },
983 [](Generate& generator) {
984 generator.setFlag(Generate::TreehouseLayout);
985 generator.generate(
986 4, 4,
987 {{{Decoration::Star | Decoration::Color::Black, 1},
988 {Decoration::Star | Decoration::Color::White, 2},
989 {Decoration::Stone | Decoration::Color::Black, 2},
990 {Decoration::Stone | Decoration::Color::White, 1},
991 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Orange,
992 1},
993 {Decoration::Poly | Decoration::Orange, 1}}});
994 },
995 };
996 30
997 Generate generator; 31 Generate generator;
998 32
@@ -1006,913 +40,8 @@ Rice::Object wittle_generator_generate_medium(Rice::Object /* self */) {
1006} 40}
1007 41
1008Rice::Object wittle_generator_generate_expert(Rice::Object /* self */) { 42Rice::Object wittle_generator_generate_expert(Rice::Object /* self */) {
1009 static std::vector<std::function<void(Generate&)>> generator_fns{ 43 const std::vector<std::function<void(Generate&)>>& generator_fns =
1010 [](Generate& generator) { 44 GetHardPuzzles();
1011 generator.setFlag(Generate::StartEdgeOnly);
1012 generator.setSymmetry(Panel::Rotational);
1013 generator.generate(
1014 6, 6,
1015 {{{Decoration::Triangle | Decoration::Color::Orange, 12},
1016 {Decoration::Start, 1},
1017 {Decoration::Exit, 1}}});
1018 },
1019 [](Generate& generator) {
1020 generator.setFlag(Generate::StartEdgeOnly);
1021 generator.setFlag(Generate::WriteInvisible);
1022 generator.setSymmetry(Panel::Rotational);
1023 generator.generate(7, 7,
1024 {{{Decoration::Dot | Decoration::Color::Blue, 4},
1025 {Decoration::Dot | Decoration::Color::Yellow, 4},
1026 {Decoration::Dot, 7},
1027 {Decoration::Start, 1},
1028 {Decoration::Exit, 1}}});
1029 },
1030 [](Generate& generator) {
1031 generator.setFlag(Generate::StartEdgeOnly);
1032 generator.setFlag(Generate::WriteInvisible);
1033 generator.setSymmetry(Panel::Rotational);
1034 generator.generate(7, 7,
1035 {{{Decoration::Stone | Decoration::Color::Black, 6},
1036 {Decoration::Stone | Decoration::Color::White, 6},
1037 {Decoration::Start, 1},
1038 {Decoration::Exit, 1}}});
1039 },
1040 [](Generate& generator) {
1041 generator.setFlag(Generate::StartEdgeOnly);
1042 generator.setFlag(Generate::WriteInvisible);
1043 generator.setSymmetry(Panel::Rotational);
1044 generator.generate(7, 7,
1045 {{{Decoration::Star | Decoration::Color::Orange, 6},
1046 {Decoration::Star | Decoration::Color::Green, 6},
1047 {Decoration::Start, 1},
1048 {Decoration::Exit, 1}}});
1049 },
1050 [](Generate& generator) {
1051 generator.setFlag(Generate::StartEdgeOnly);
1052 generator.setFlag(Generate::WriteInvisible);
1053 generator.setFlag(Generate::RequireCombineShapes);
1054 generator.setSymmetry(Panel::Rotational);
1055 generator.generate(5, 5,
1056 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1057 {Decoration::Start, 1},
1058 {Decoration::Exit, 1}}});
1059 },
1060 [](Generate& generator) {
1061 generator.setFlag(Generate::StartEdgeOnly);
1062 generator.setFlag(Generate::WriteInvisible);
1063 generator.setSymmetry(Panel::Rotational);
1064 generator.generate(
1065 7, 7,
1066 {{{Decoration::Dot | Decoration::Color::Blue, 2},
1067 {Decoration::Dot | Decoration::Color::Yellow, 2},
1068 {Decoration::Dot, 8},
1069 {Decoration::Eraser | Decoration::Color::Purple, 1},
1070 {Decoration::Start, 1},
1071 {Decoration::Exit, 1}}});
1072 },
1073 [](Generate& generator) {
1074 generator.setSymbol(Decoration::Exit, 0, 0);
1075 generator.setSymbol(Decoration::Exit, 0, 4 * 4);
1076 generator.setSymbol(Decoration::Exit, 4 * 4, 0);
1077 generator.setSymbol(Decoration::Exit, 4 * 4, 4 * 4);
1078 generator.generate(8, 8,
1079 {{{Decoration::Stone | Decoration::Color::White, 10},
1080 {Decoration::Stone | Decoration::Color::Black, 10},
1081 {Decoration::Dot_Intersection, 81},
1082 {Decoration::Start, 8}}});
1083 },
1084 [](Generate& generator) {
1085 generator.setFlag(Generate::RegularStartEnd);
1086 generator.generate(
1087 6, 6,
1088 {{{Decoration::Dot_Intersection, 49},
1089 {Decoration::Poly | Decoration::Color::Orange, 1},
1090 {Decoration::Poly | Decoration::Color::Blue, 1},
1091 {Decoration::Poly | Decoration::Negative |
1092 Decoration::Color::Blue,
1093 2},
1094 {Decoration::Poly | Decoration::Negative |
1095 Decoration::Color::Orange,
1096 1},
1097 {Decoration::Star | Decoration::Color::Orange, 4},
1098 {Decoration::Star | Decoration::Color::Blue, 3},
1099 {Decoration::Triangle | Decoration::Color::Orange, 2},
1100 {Decoration::Triangle | Decoration::Color::Blue, 1},
1101 {Decoration::Stone | Decoration::Color::Orange, 1},
1102 {Decoration::Stone | Decoration::Color::Blue, 2},
1103 {Decoration::Eraser | Decoration::Color::White, 1}}});
1104 },
1105 [](Generate& generator) {
1106 generator.setFlag(Generate::RegularStartEnd);
1107 generator.setSymmetry(Panel::Rotational);
1108 generator.generate(
1109 7, 7, {{{Decoration::Poly | Decoration::Color::Yellow, 5}}});
1110 },
1111 [](Generate& generator) {
1112 generator.setFlag(Generate::RegularStartEnd);
1113 generator.generate(
1114 5, 5,
1115 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
1116 {Decoration::Poly | Decoration::Color::Yellow |
1117 Decoration::Can_Rotate,
1118 1},
1119 {Decoration::Stone | Decoration::Color::Black, 5},
1120 {Decoration::Stone | Decoration::Color::White, 3}}});
1121 },
1122 [](Generate& generator) {
1123 generator.setFlag(Generate::RegularStartEnd);
1124 generator.setFlag(Generate::BigShapes);
1125 generator.generate(
1126 5, 5,
1127 {{{Decoration::Poly | Decoration::Color::Yellow |
1128 Decoration::Can_Rotate,
1129 2},
1130 {Decoration::Triangle | Decoration::Color::Orange, 3},
1131 {Decoration::Stone | Decoration::Color::Black, 3},
1132 {Decoration::Stone | Decoration::Color::White, 3}}});
1133 },
1134 [](Generate& generator) {
1135 generator.setFlag(Generate::StartEdgeOnly);
1136 generator.setSymbol(Decoration::Exit, 4 * 2, 0);
1137 generator.generate(5, 5,
1138 {{{Decoration::Dot_Intersection, 36},
1139 {Decoration::Poly | Decoration::Color::Yellow, 3},
1140 {Decoration::Start, 1}}});
1141 },
1142 [](Generate& generator) {
1143 generator.setFlag(Generate::RegularStartEnd);
1144 generator.setFlag(Generate::BigShapes);
1145 generator.setFlag(Generate::RequireCancelShapes);
1146 generator.generate(5, 5,
1147 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1148 {Decoration::Poly | Decoration::Negative |
1149 Decoration::Color::Blue,
1150 3}}});
1151 },
1152 [](Generate& generator) {
1153 generator.setFlag(Generate::RegularStartEnd);
1154 generator.generate(
1155 5, 6,
1156 {{{Decoration::Dot_Intersection, 42},
1157 {Decoration::Poly | Decoration::Color::Yellow, 2},
1158 {Decoration::Poly | Decoration::Color::Yellow |
1159 Decoration::Can_Rotate,
1160 1},
1161 {Decoration::Triangle | Decoration::Color::Orange, 3},
1162 {Decoration::Stone | Decoration::Color::Black, 2},
1163 {Decoration::Stone | Decoration::Color::White, 2}}});
1164 },
1165 [](Generate& generator) {
1166 generator.setFlag(Generate::RegularStartEnd);
1167 generator.generate(
1168 5, 5,
1169 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1170 {Decoration::Poly | Decoration::Negative |
1171 Decoration::Color::Blue,
1172 1},
1173 {Decoration::Stone | Decoration::Color::Black, 4},
1174 {Decoration::Stone | Decoration::Color::White, 3}}});
1175 },
1176 [](Generate& generator) {
1177 generator.setFlag(Generate::RegularStartEnd);
1178 generator.generate(
1179 5, 5,
1180 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1181 {Decoration::Poly | Decoration::Negative |
1182 Decoration::Color::Blue,
1183 2},
1184 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
1185 },
1186 [](Generate& generator) {
1187 generator.setFlag(Generate::RegularStartEnd);
1188 generator.generate(
1189 5, 5,
1190 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1191 {Decoration::Poly | Decoration::Negative |
1192 Decoration::Color::Blue,
1193 1},
1194 {Decoration::Triangle | Decoration::Color::Orange, 3},
1195 {Decoration::Stone | Decoration::Color::Black, 2},
1196 {Decoration::Stone | Decoration::Color::White, 2}}});
1197 },
1198 [](Generate& generator) {
1199 generator.setFlag(Generate::RegularStartEnd);
1200 generator.generate(
1201 5, 5,
1202 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1203 {Decoration::Poly | Decoration::Negative |
1204 Decoration::Color::Blue,
1205 2},
1206 {Decoration::Triangle | Decoration::Color::Orange, 3},
1207 {Decoration::Stone | Decoration::Color::Black, 2},
1208 {Decoration::Stone | Decoration::Color::White, 2}}});
1209 },
1210 [](Generate& generator) {
1211 generator.setFlag(Generate::DisconnectShapes);
1212 generator.setFlag(Generate::BigShapes);
1213 generator.setSymbol(Decoration::Start, 0, 5 * 2);
1214 generator.setSymbol(Decoration::Exit, 0, 0);
1215 generator.generate(
1216 5, 5,
1217 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
1218 {Decoration::Poly | Decoration::Negative |
1219 Decoration::Color::Blue,
1220 1},
1221 {Decoration::Triangle | Decoration::Color::Orange, 3},
1222 {Decoration::Stone | Decoration::Color::Black, 2},
1223 {Decoration::Stone | Decoration::Color::White, 2}}});
1224 },
1225 [](Generate& generator) {
1226 generator.setFlag(Generate::BigShapes);
1227 generator.setSymbol(Decoration::Exit, 5 * 2, 0);
1228 generator.generate(5, 5,
1229 {{{Decoration::Dot_Intersection, 36},
1230 {Decoration::Poly | Decoration::Color::Yellow, 2},
1231 {Decoration::Poly | Decoration::Negative |
1232 Decoration::Color::Blue,
1233 1},
1234 {Decoration::Start, 1}}});
1235 },
1236 [](Generate& generator) {
1237 generator.setFlag(Generate::BigShapes);
1238 generator.setSymbol(Decoration::Exit, 5 * 2, 0);
1239 generator.generate(5, 5,
1240 {{{Decoration::Dot_Intersection, 36},
1241 {Decoration::Poly | Decoration::Color::Yellow, 3},
1242 {Decoration::Poly | Decoration::Negative |
1243 Decoration::Color::Blue,
1244 2},
1245 {Decoration::Start, 1}}});
1246 },
1247 [](Generate& generator) {
1248 generator.setFlag(Generate::TreehouseLayout);
1249 generator.generate(
1250 5, 5,
1251 {{{Decoration::Star | Decoration::Color::Orange, 4},
1252 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
1253 },
1254 [](Generate& generator) {
1255 generator.setFlag(Generate::TreehouseLayout);
1256 generator.generate(
1257 5, 5,
1258 {{{Decoration::Star | Decoration::Color::Orange, 6},
1259 {Decoration::Triangle | Decoration::Color::Orange, 5}}});
1260 },
1261 [](Generate& generator) {
1262 generator.setFlag(Generate::RegularStartEnd);
1263 generator.generate(
1264 5, 5,
1265 {{{Decoration::Star | Decoration::Color::Orange, 5},
1266 {Decoration::Triangle | Decoration::Color::Orange, 3},
1267 {Decoration::Stone | Decoration::Color::Orange, 3}}});
1268 },
1269 [](Generate& generator) {
1270 generator.setFlag(Generate::TreehouseLayout);
1271 generator.generate(5, 5,
1272 {{{Decoration::Poly | Decoration::Color::Orange, 3},
1273 {Decoration::Poly | Decoration::Negative |
1274 Decoration::Color::Blue,
1275 1},
1276 {Decoration::Star | Decoration::Color::Orange, 5},
1277 {Decoration::Star | Decoration::Color::Blue, 3}}});
1278 },
1279 [](Generate& generator) {
1280 generator.setFlag(Generate::TreehouseLayout);
1281 generator.generate(5, 5,
1282 {{{Decoration::Poly | Decoration::Color::Orange, 3},
1283 {Decoration::Poly | Decoration::Negative |
1284 Decoration::Color::Blue,
1285 2},
1286 {Decoration::Star | Decoration::Color::Orange, 5},
1287 {Decoration::Star | Decoration::Color::Blue, 3}}});
1288 },
1289 [](Generate& generator) {
1290 generator.setFlag(Generate::TreehouseLayout);
1291 generator.generate(
1292 5, 5,
1293 {{{Decoration::Poly | Decoration::Color::Orange, 1},
1294 {Decoration::Poly | Decoration::Color::Magenta, 2},
1295 {Decoration::Poly | Decoration::Negative |
1296 Decoration::Color::Orange,
1297 2},
1298 {Decoration::Poly | Decoration::Negative |
1299 Decoration::Color::Blue,
1300 2},
1301 {Decoration::Star | Decoration::Color::Orange, 3},
1302 {Decoration::Star | Decoration::Color::Blue, 3},
1303 {Decoration::Star | Decoration::Color::Magenta, 3}}});
1304 },
1305 [](Generate& generator) {
1306 generator.setFlag(Generate::TreehouseLayout);
1307 generator.generate(
1308 5, 5,
1309 {{{Decoration::Poly | Decoration::Color::Magenta, 2},
1310 {Decoration::Poly | Decoration::Negative |
1311 Decoration::Color::Blue,
1312 2},
1313 {Decoration::Star | Decoration::Color::Magenta, 3},
1314 {Decoration::Star | Decoration::Color::Blue, 3},
1315 {Decoration::Triangle | Decoration::Color::Magenta, 2},
1316 {Decoration::Triangle | Decoration::Color::Blue, 2}}});
1317 },
1318 [](Generate& generator) {
1319 generator.setFlag(Generate::TreehouseLayout);
1320 generator.generate(
1321 5, 5,
1322 {{{Decoration::Poly | Decoration::Color::Orange, 1},
1323 {Decoration::Poly | Decoration::Color::Blue, 1},
1324 {Decoration::Poly | Decoration::Color::Green, 1},
1325 {Decoration::Poly | Decoration::Negative |
1326 Decoration::Color::Blue,
1327 1},
1328 {Decoration::Poly | Decoration::Negative |
1329 Decoration::Color::Magenta,
1330 2},
1331 {Decoration::Star | Decoration::Color::Green, 2},
1332 {Decoration::Star | Decoration::Color::Magenta, 1},
1333 {Decoration::Star | Decoration::Color::Orange, 1},
1334 {Decoration::Star | Decoration::Color::Blue, 2},
1335 {Decoration::Triangle | Decoration::Color::Magenta, 2},
1336 {Decoration::Triangle | Decoration::Color::Orange, 1},
1337 {Decoration::Triangle | Decoration::Color::Green, 2}}});
1338 },
1339 [](Generate& generator) {
1340 generator.setFlag(Generate::TreehouseLayout);
1341 generator.generate(
1342 5, 5,
1343 {{{Decoration::Star | Decoration::Color::Orange, 4},
1344 {Decoration::Star | Decoration::Color::Magenta, 4},
1345 {Decoration::Triangle | Decoration::Color::Orange, 2},
1346 {Decoration::Triangle | Decoration::Color::Magenta, 2}}});
1347 },
1348 [](Generate& generator) {
1349 generator.setFlag(Generate::TreehouseLayout);
1350 generator.generate(
1351 5, 5,
1352 {{{Decoration::Star | Decoration::Color::Orange, 3},
1353 {Decoration::Star | Decoration::Color::Magenta, 3},
1354 {Decoration::Star | Decoration::Color::Green, 6},
1355 {Decoration::Triangle | Decoration::Color::Orange, 2},
1356 {Decoration::Triangle | Decoration::Color::Magenta, 2}}});
1357 },
1358 [](Generate& generator) {
1359 generator.setFlag(Generate::TreehouseLayout);
1360 generator.generate(
1361 5, 5,
1362 {{{Decoration::Star | Decoration::Color::Orange, 4},
1363 {Decoration::Star | Decoration::Color::Magenta, 4},
1364 {Decoration::Star | Decoration::Color::Green, 6},
1365 {Decoration::Triangle | Decoration::Color::Orange, 1},
1366 {Decoration::Triangle | Decoration::Color::Magenta, 1}}});
1367 },
1368 [](Generate& generator) {
1369 generator.setFlag(Generate::TreehouseLayout);
1370 generator.generate(
1371 5, 5,
1372 {{{Decoration::Star | Decoration::Color::Orange, 2},
1373 {Decoration::Star | Decoration::Color::Magenta, 2},
1374 {Decoration::Star | Decoration::Color::White, 2},
1375 {Decoration::Star | Decoration::Color::Green, 2},
1376 {Decoration::Star | Decoration::Color::Black, 2},
1377 {Decoration::Triangle | Decoration::Color::Orange, 1},
1378 {Decoration::Triangle | Decoration::Color::Magenta, 1},
1379 {Decoration::Triangle | Decoration::Color::White, 1},
1380 {Decoration::Triangle | Decoration::Color::Green, 1},
1381 {Decoration::Triangle | Decoration::Color::Black, 1}}});
1382 },
1383 [](Generate& generator) {
1384 generator.setFlag(Generate::TreehouseLayout);
1385 generator.generate(5, 5,
1386 {{{Decoration::Star | Decoration::Color::Magenta, 4},
1387 {Decoration::Star | Decoration::Color::Orange, 6},
1388 {Decoration::Dot_Intersection, 36}}});
1389 },
1390 [](Generate& generator) {
1391 generator.setGridSize(7, 7);
1392 generator.setFlag(Generate::RequireCombineShapes);
1393 generator.setSymmetry(Panel::ParallelV);
1394 generator.setSymbol(Decoration::Start, 0, 14);
1395 generator.setSymbol(Decoration::Start, 8, 14);
1396 generator.setSymbol(Decoration::Exit, 6, 0);
1397 generator.setSymbol(Decoration::Exit, 14, 0);
1398 generator.generate(
1399 7, 7, {{{Decoration::Poly | Decoration::Color::Orange, 5}}});
1400 },
1401 [](Generate& generator) {
1402 generator.setGridSize(7, 7);
1403 generator.setFlag(Generate::RequireCombineShapes);
1404 generator.setSymmetry(Panel::ParallelHFlip);
1405 generator.setSymbol(Decoration::Start, 0, 14);
1406 generator.setSymbol(Decoration::Start, 14, 6);
1407 generator.setSymbol(Decoration::Exit, 0, 0);
1408 generator.setSymbol(Decoration::Exit, 14, 8);
1409 generator.generate(
1410 7, 7, {{{Decoration::Poly | Decoration::Color::Orange, 5}}});
1411 },
1412 [](Generate& generator) {
1413 generator.setGridSize(7, 7);
1414 generator.setFlag(Generate::RequireCombineShapes);
1415 generator.setSymmetry(Panel::ParallelVFlip);
1416 generator.setSymbol(Decoration::Start, 0, 14);
1417 generator.setSymbol(Decoration::Start, 8, 0);
1418 generator.setSymbol(Decoration::Exit, 6, 0);
1419 generator.setSymbol(Decoration::Exit, 14, 14);
1420 generator.generate(
1421 7, 7, {{{Decoration::Poly | Decoration::Color::Orange, 5}}});
1422 },
1423 [](Generate& generator) {
1424 generator.setSymmetry(Panel::Symmetry::RotateLeft);
1425 generator.setSymbol(Decoration::Start, 4, 4);
1426 generator.setSymbol(Decoration::Start, 10, 4);
1427 generator.setSymbol(Decoration::Start, 4, 10);
1428 generator.setSymbol(Decoration::Start, 10, 10);
1429 generator.setSymbol(Decoration::Exit, 4, 0);
1430 generator.setSymbol(Decoration::Exit, 14, 4);
1431 generator.setSymbol(Decoration::Exit, 0, 10);
1432 generator.setSymbol(Decoration::Exit, 10, 14);
1433 generator.generate(
1434 7, 7,
1435 {{{Decoration::Triangle4 | Decoration::Color::Orange, 1},
1436 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
1437 },
1438 [](Generate& generator) {
1439 generator.setFlag(Generate::WriteInvisible);
1440 generator.setFlag(Generate::StartEdgeOnly);
1441 generator.setSymmetry(Panel::Symmetry::FlipXY);
1442 generator.setSymbol(Decoration::Exit, 0, 8);
1443 generator.setSymbol(Decoration::Exit, 8, 0);
1444 generator.generate(7, 7,
1445 {{{Decoration::Dot | Decoration::Color::Blue, 2},
1446 {Decoration::Dot | Decoration::Color::Yellow, 2},
1447 {Decoration::Dot, 8},
1448 {Decoration::Eraser | Decoration::Color::White, 1},
1449 {Decoration::Start, 1}}});
1450 },
1451 [](Generate& generator) {
1452 generator.setSymmetry(Panel::Symmetry::FlipXY);
1453 generator.setSymbol(Decoration::Start, 0, 16);
1454 generator.setSymbol(Decoration::Start, 16, 0);
1455 generator.setSymbol(Decoration::Exit, 8, 0);
1456 generator.setSymbol(Decoration::Exit, 8, 16);
1457 generator.setSymbol(Decoration::Exit, 0, 8);
1458 generator.setSymbol(Decoration::Exit, 16, 8);
1459 generator.generate(
1460 8, 8,
1461 {{{Decoration::Triangle | Decoration::Color::Cyan, 3},
1462 {Decoration::Triangle | Decoration::Color::Yellow, 2},
1463 {Decoration::Star | Decoration::Color::Cyan, 3},
1464 {Decoration::Star | Decoration::Color::Yellow, 3},
1465 {Decoration::Stone | Decoration::Color::Cyan, 2},
1466 {Decoration::Stone | Decoration::Color::Yellow, 3}}});
1467 },
1468 [](Generate& generator) {
1469 generator.setGridSize(7, 7);
1470 generator.setSymmetry((Random::rand() % 2) == 0
1471 ? Panel::Symmetry::Vertical
1472 : Panel::Symmetry::Horizontal);
1473 generator.setFlag(Generate::WriteInvisible);
1474 generator.setFlag(Generate::DisableDotIntersection);
1475 MakeSecretSymmetryGrid(generator);
1476 generator.generate(
1477 7, 7,
1478 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
1479 {Decoration::Dot | Decoration::Color::Yellow, 2},
1480 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
1481 },
1482 [](Generate& generator) {
1483 generator.setGridSize(7, 7);
1484 generator.setSymmetry((Random::rand() % 2) == 0
1485 ? Panel::Symmetry::ParallelH
1486 : Panel::Symmetry::ParallelV);
1487 generator.setFlag(Generate::WriteInvisible);
1488 generator.setFlag(Generate::DisableDotIntersection);
1489 MakeSecretSymmetryGrid(generator);
1490 generator.generate(
1491 7, 7,
1492 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
1493 {Decoration::Dot | Decoration::Color::Yellow, 2},
1494 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
1495 },
1496 [](Generate& generator) {
1497 generator.setGridSize(7, 7);
1498 generator.setSymmetry(Panel::Symmetry::Rotational);
1499 generator.setFlag(Generate::WriteInvisible);
1500 generator.setFlag(Generate::DisableDotIntersection);
1501 MakeSecretSymmetryGrid(generator);
1502 generator.generate(
1503 7, 7,
1504 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
1505 {Decoration::Dot | Decoration::Color::Yellow, 2},
1506 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
1507 },
1508 [](Generate& generator) {
1509 generator.setGridSize(7, 7);
1510 generator.setSymmetry((Random::rand() % 2) == 0
1511 ? Panel::Symmetry::ParallelHFlip
1512 : Panel::Symmetry::ParallelVFlip);
1513 generator.setFlag(Generate::WriteInvisible);
1514 generator.setFlag(Generate::DisableDotIntersection);
1515 MakeSecretSymmetryGrid(generator);
1516 generator.generate(
1517 7, 7,
1518 {{{Decoration::Dot | Decoration::Color::Cyan, 2},
1519 {Decoration::Dot | Decoration::Color::Yellow, 2},
1520 {Decoration::Triangle | Decoration::Color::Orange, 4}}});
1521 },
1522 [](Generate& generator) {
1523 generator.setFlag(Generate::RegularStartEnd);
1524 generator.generate(
1525 4, 4,
1526 {{{Decoration::Triangle | Decoration::Color::Orange, 15},
1527 {Decoration::Eraser | Decoration::Color::Purple, 1}}});
1528 },
1529 [](Generate& generator) {
1530 generator.setFlag(Generate::RegularStartEnd);
1531 generator.generate(
1532 4, 4,
1533 {{{Decoration::Stone | Decoration::Color::White, 1},
1534 {Decoration::Stone | Decoration::Color::Black, 2},
1535 {Decoration::Stone | Decoration::Color::Red, 2},
1536 {Decoration::Star | Decoration::Color::White, 4},
1537 {Decoration::Star | Decoration::Color::Black, 3},
1538 {Decoration::Star | Decoration::Color::Red, 3},
1539 {Decoration::Decoration::Eraser | Decoration::Color::Green, 1}}});
1540 },
1541 [](Generate& generator) {
1542 generator.setFlag(Generate::RegularStartEnd);
1543 generator.generate(
1544 4, 4,
1545 {{{Decoration::Poly | Decoration::Color::Yellow, 1},
1546 {Decoration::Poly | Decoration::Color::Yellow |
1547 Decoration::Can_Rotate,
1548 1},
1549 {Decoration::Triangle | Decoration::Color::Orange, 3}}});
1550 },
1551 [](Generate& generator) {
1552 generator.setFlag(Generate::RegularStartEnd);
1553 generator.generate(
1554 4, 4,
1555 {{{Decoration::Poly | Decoration::Color::Yellow, 2},
1556 {Decoration::Poly | Decoration::Color::Yellow |
1557 Decoration::Can_Rotate,
1558 1},
1559 {Decoration::Triangle | Decoration::Color::Orange, 2},
1560 {Decoration::Stone | Decoration::Color::Black, 2},
1561 {Decoration::Stone | Decoration::Color::White, 2}}});
1562 },
1563 [](Generate& generator) {
1564 generator.setSymbol(Decoration::Start, 4, 4);
1565 generator.setSymbol(Decoration::Exit, 8, 0);
1566 generator.generate(4, 4,
1567 {{{Decoration::Poly | Decoration::Color::Yellow |
1568 Decoration::Can_Rotate,
1569 3},
1570 {Decoration::Gap, 3}}});
1571 },
1572 [](Generate& generator) {
1573 generator.setSymbol(Decoration::Start, 4, 6);
1574 generator.setSymbol(Decoration::Exit, 10, 0);
1575 generator.generate(5, 5,
1576 {{{Decoration::Poly | Decoration::Color::Yellow |
1577 Decoration::Can_Rotate,
1578 3},
1579 {Decoration::Gap, 3}}});
1580 },
1581 [](Generate& generator) {
1582 generator.setFlag(Generate::DisconnectShapes);
1583 generator.setSymbol(Decoration::Start, 4, 6);
1584 generator.setSymbol(Decoration::Exit, 10, 0);
1585 generator.generate(5, 5,
1586 {{{Decoration::Poly | Decoration::Color::Yellow |
1587 Decoration::Can_Rotate,
1588 3}}});
1589 },
1590 [](Generate& generator) {
1591 generator.setSymbol(Decoration::Exit, 10, 0);
1592 generator.generate(5, 5,
1593 {{{Decoration::Dot_Intersection, 36},
1594 {Decoration::Poly | Decoration::Color::Yellow, 2},
1595 {Decoration::Poly | Decoration::Color::Yellow |
1596 Decoration::Can_Rotate,
1597 1},
1598 {Decoration::Start, 1}}});
1599 },
1600 [](Generate& generator) {
1601 generator.setFlag(Generate::BigShapes);
1602 generator.setSymbol(Decoration::Exit, 10, 0);
1603 generator.generate(5, 5,
1604 {{{Decoration::Dot_Intersection, 36},
1605 {Decoration::Poly | Decoration::Color::Yellow, 3},
1606 {Decoration::Start, 1}}});
1607 },
1608 [](Generate& generator) {
1609 generator.setFlag(Generate::DisconnectShapes);
1610 generator.setSymbol(Decoration::Exit, 10, 0);
1611 generator.generate(5, 5,
1612 {{{Decoration::Dot_Intersection, 36},
1613 {Decoration::Poly | Decoration::Color::Yellow, 3},
1614 {Decoration::Start, 1}}});
1615 },
1616 [](Generate& generator) {
1617 generator.setFlag(Generate::TreehouseLayout);
1618 generator.generate(
1619 4, 4,
1620 {{{Decoration::Triangle | Decoration::Color::Magenta, 4},
1621 {Decoration::Stone | Decoration::Color::Black, 2},
1622 {Decoration::Stone | Decoration::Color::White, 2},
1623 {Decoration::Star | Decoration::Color::Black, 1},
1624 {Decoration::Star | Decoration::Color::White, 1}}});
1625 },
1626 [](Generate& generator) {
1627 generator.setFlag(Generate::TreehouseLayout);
1628 generator.generate(
1629 4, 4,
1630 {{{Decoration::Triangle | Decoration::Color::Orange, 2},
1631 {Decoration::Triangle | Decoration::Color::Magenta, 2},
1632 {Decoration::Star | Decoration::Color::Magenta, 2},
1633 {Decoration::Star | Decoration::Color::Green, 2},
1634 {Decoration::Stone | Decoration::Color::Orange, 2},
1635 {Decoration::Stone | Decoration::Color::Green, 2}}});
1636 },
1637 [](Generate& generator) {
1638 generator.setFlag(Generate::TreehouseLayout);
1639 generator.generate(
1640 5, 4,
1641 {{{Decoration::Triangle | Decoration::Color::Green, 3},
1642 {Decoration::Triangle | Decoration::Color::Magenta, 2},
1643 {Decoration::Star | Decoration::Color::Magenta, 3},
1644 {Decoration::Star | Decoration::Color::Orange, 3},
1645 {Decoration::Stone | Decoration::Color::Orange, 2},
1646 {Decoration::Stone | Decoration::Color::Green, 2}}});
1647 },
1648 [](Generate& generator) {
1649 generator.setFlag(Generate::TreehouseLayout);
1650 generator.generate(
1651 4, 4,
1652 {{{Decoration::Star | Decoration::Color::Black, 1},
1653 {Decoration::Star | Decoration::Color::White, 2},
1654 {Decoration::Stone | Decoration::Color::Black, 2},
1655 {Decoration::Stone | Decoration::Color::White, 1},
1656 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
1657 1},
1658 {Decoration::Poly | Decoration::Black, 1}}});
1659 },
1660 [](Generate& generator) {
1661 generator.setFlag(Generate::TreehouseLayout);
1662 generator.generate(
1663 4, 4,
1664 {{{Decoration::Star | Decoration::Color::Black, 1},
1665 {Decoration::Star | Decoration::Color::White, 2},
1666 {Decoration::Stone | Decoration::Color::Black, 2},
1667 {Decoration::Stone | Decoration::Color::White, 1},
1668 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
1669 1},
1670 {Decoration::Poly | Decoration::White, 1}}});
1671 },
1672 [](Generate& generator) {
1673 generator.setFlag(Generate::TreehouseLayout);
1674 generator.generate(
1675 5, 5,
1676 {{{Decoration::Star | Decoration::Color::Green, 2},
1677 {Decoration::Star | Decoration::Color::Magenta, 4},
1678 {Decoration::Stone | Decoration::Color::Green, 2},
1679 {Decoration::Stone | Decoration::Color::Magenta, 2},
1680 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Green,
1681 1},
1682 {Decoration::Poly | Decoration::Green, 1}}});
1683 },
1684 [](Generate& generator) {
1685 generator.setFlag(Generate::TreehouseLayout);
1686 generator.setFlag(Generate::BigShapes);
1687 generator.generate(
1688 5, 5,
1689 {{{Decoration::Star | Decoration::Color::Green, 3},
1690 {Decoration::Star | Decoration::Color::Magenta, 4},
1691 {Decoration::Stone | Decoration::Color::Green, 2},
1692 {Decoration::Stone | Decoration::Color::Magenta, 2},
1693 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Green,
1694 1},
1695 {Decoration::Poly | Decoration::Magenta, 1}}});
1696 },
1697 [](Generate& generator) {
1698 generator.setFlag(Generate::TreehouseLayout);
1699 generator.generate(
1700 5, 5,
1701 {{{Decoration::Star | Decoration::Color::Black, 2},
1702 {Decoration::Star | Decoration::Color::White, 3},
1703 {Decoration::Stone | Decoration::Color::Black, 2},
1704 {Decoration::Stone | Decoration::Color::White, 1},
1705 {Decoration::Triangle | Decoration::Color::Black, 2},
1706 {Decoration::Triangle | Decoration::Color::White, 1},
1707 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
1708 1},
1709 {Decoration::Poly | Decoration::White, 1}}});
1710 },
1711 [](Generate& generator) {
1712 generator.setFlag(Generate::TreehouseLayout);
1713 generator.generate(
1714 5, 5,
1715 {{{Decoration::Star | Decoration::Color::Black, 3},
1716 {Decoration::Star | Decoration::Color::White, 3},
1717 {Decoration::Stone | Decoration::Color::Black, 1},
1718 {Decoration::Stone | Decoration::Color::White, 1},
1719 {Decoration::Poly | Decoration::Can_Rotate | Decoration::Black,
1720 1},
1721 {Decoration::Poly | Decoration::Can_Rotate | Decoration::White,
1722 1},
1723 {Decoration::Triangle | Decoration::Black, 1},
1724 {Decoration::Triangle | Decoration::White, 1}}});
1725 },
1726 [](Generate& generator) {
1727 generator.setGridSize(5, 5);
1728 generator.setSymbol(Decoration::Start, 10, 10);
1729 generator.setSymbol(Decoration::Exit, 0, 0);
1730 generator.generate(
1731 5, 5,
1732 {{{Decoration::Star | Decoration::White, 3},
1733 {Decoration::Star | Decoration::Black, 8},
1734 {Decoration::Star | Decoration::Magenta, 6},
1735 {Decoration::Eraser | Decoration::Color::White, 1}}});
1736 },
1737 [](Generate& generator) {
1738 generator.setFlag(Generate::RegularStartEnd);
1739 generator.setFlag(Generate::DisconnectShapes);
1740 generator.generate(
1741 4, 4,
1742 {{{Decoration::Poly | Decoration::Color::Yellow, 4},
1743 {Decoration::Eraser | Decoration::Color::White, 1}}});
1744 },
1745 [](Generate& generator) {
1746 generator.setFlag(Generate::RegularStartEnd);
1747 generator.generate(
1748 4, 4,
1749 {{{Decoration::Poly | Decoration::Color::Yellow, 4},
1750 {Decoration::Poly | Decoration::Negative |
1751 Decoration::Color::Blue,
1752 1},
1753 {Decoration::Eraser | Decoration::Color::White, 1}}});
1754 },
1755 [](Generate& generator) {
1756 generator.setFlag(Generate::RegularStartEnd);
1757 generator.setFlag(Generate::DisconnectShapes);
1758 generator.generate(
1759 4, 4,
1760 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1761 {Decoration::Poly | Decoration::Negative |
1762 Decoration::Color::Blue,
1763 1},
1764 {Decoration::Eraser | Decoration::Color::White, 1}}});
1765 },
1766 [](Generate& generator) {
1767 generator.setFlag(Generate::RegularStartEnd);
1768 generator.generate(4, 4,
1769 {{{Decoration::Star | Decoration::Color::Green, 7},
1770 {Decoration::Star | Decoration::Color::Orange, 5},
1771 {Decoration::Eraser | Decoration::Green, 1},
1772 {Decoration::Eraser | Decoration::Orange, 1}}});
1773 },
1774 [](Generate& generator) {
1775 generator.setFlag(Generate::RegularStartEnd);
1776 generator.generate(5, 5,
1777 {{{Decoration::Star | Decoration::Color::Magenta, 8},
1778 {Decoration::Star | Decoration::Color::Orange, 6},
1779 {Decoration::Star | Decoration::Color::Green, 4},
1780 {Decoration::Eraser | Decoration::Magenta, 1},
1781 {Decoration::Eraser | Decoration::Orange, 1}}});
1782 },
1783 [](Generate& generator) {
1784 generator.setFlag(Generate::RegularStartEnd);
1785 generator.generate(
1786 4, 4,
1787 {{{Decoration::Poly | Decoration::Color::Green, 4},
1788 {Decoration::Eraser | Decoration::Color::White, 2}}});
1789 },
1790 [](Generate& generator) {
1791 generator.setFlag(Generate::RegularStartEnd);
1792 generator.setFlag(Generate::DisconnectShapes);
1793 generator.generate(
1794 4, 4,
1795 {{{Decoration::Poly | Decoration::Color::Green, 4},
1796 {Decoration::Eraser | Decoration::Color::White, 2}}});
1797 },
1798 [](Generate& generator) {
1799 generator.setFlag(Generate::RegularStartEnd);
1800 generator.generate(
1801 4, 4,
1802 {{{Decoration::Poly | Decoration::Color::Green, 2},
1803 {Decoration::Poly | Decoration::Color::Magenta, 1},
1804 {Decoration::Star | Decoration::Color::Green, 2},
1805 {Decoration::Star | Decoration::Color::Magenta, 2},
1806 {Decoration::Eraser | Decoration::Color::White, 2}}});
1807 },
1808 [](Generate& generator) {
1809 generator.setFlag(Generate::RegularStartEnd);
1810 generator.generate(6, 3,
1811 {{{Decoration::Star | Decoration::Color::Orange, 4},
1812 {Decoration::Poly | Decoration::Color::Orange, 2},
1813 {Decoration::Poly | Decoration::Negative |
1814 Decoration::Color::Magenta,
1815 2},
1816 {Decoration::Eraser | Decoration::White, 2}}});
1817 },
1818 [](Generate& generator) {
1819 generator.setFlag(Generate::RegularStartEnd);
1820 generator.generate(6, 3,
1821 {{{Decoration::Star | Decoration::Color::Magenta, 2},
1822 {Decoration::Star | Decoration::Color::Orange, 3},
1823 {Decoration::Poly | Decoration::Color::Orange, 2},
1824 {Decoration::Poly | Decoration::Negative |
1825 Decoration::Color::Magenta,
1826 2},
1827 {Decoration::Eraser | Decoration::White, 2}}});
1828 },
1829 [](Generate& generator) {
1830 generator.setFlag(Generate::FalseParity);
1831 generator.setSymbol(Decoration::Exit, 0, 0);
1832 generator.setSymbol(Decoration::Exit, 16, 0);
1833 generator.setSymbol(Decoration::Exit, 0, 16);
1834 generator.setSymbol(Decoration::Exit, 16, 16);
1835 generator.generate(
1836 8, 8,
1837 {{{Decoration::Stone | Decoration::Color::White, 10},
1838 {Decoration::Stone | Decoration::Color::Black, 10},
1839 {Decoration::Dot_Intersection, 81},
1840 {Decoration::Start, 7},
1841 {Decoration::Eraser | Decoration::Color::Purple, 1}}});
1842 },
1843 [](Generate& generator) {
1844 generator.setFlag(Generate::TreehouseLayout);
1845 generator.generate(
1846 4, 5,
1847 {{{Decoration::Poly | Decoration::Color::Yellow, 3},
1848 {Decoration::Triangle | Decoration::Color::Orange, 5},
1849 {Decoration::Eraser | Decoration::Color::White, 1}}});
1850 },
1851 [](Generate& generator) {
1852 generator.setFlag(Generate::RegularStartEnd);
1853 generator.generate(
1854 5, 5,
1855 {{{Decoration::Poly | Decoration::Color::Yellow, 7},
1856 {Decoration::Stone | Decoration::Color::White, 3},
1857 {Decoration::Stone | Decoration::Color::Black, 3},
1858 {Decoration::Triangle | Decoration::Color::Orange, 6}}});
1859 },
1860 [](Generate& generator) {
1861 generator.setSymbol(Decoration::Exit, 10, 0);
1862 generator.generate(
1863 5, 5,
1864 {{{Decoration::Dot_Intersection, 36},
1865 {Decoration::Triangle1 | Decoration::Color::Orange, 4},
1866 {Decoration::Start, 1}}});
1867 },
1868 [](Generate& generator) {
1869 generator.setSymbol(Decoration::Exit, 10, 0);
1870 generator.generate(
1871 5, 5,
1872 {{{Decoration::Dot_Intersection, 36},
1873 {Decoration::Triangle3 | Decoration::Color::Orange, 6},
1874 {Decoration::Start, 1}}});
1875 },
1876 [](Generate& generator) {
1877 generator.setSymbol(Decoration::Exit, 10, 0);
1878 generator.generate(
1879 5, 5,
1880 {{{Decoration::Dot_Intersection, 36},
1881 {Decoration::Triangle2 | Decoration::Color::Orange, 10},
1882 {Decoration::Start, 1}}});
1883 },
1884 [](Generate& generator) {
1885 generator.setSymbol(Decoration::Exit, 10, 0);
1886 generator.generate(
1887 5, 5,
1888 {{{Decoration::Dot_Intersection, 36},
1889 {Decoration::Triangle | Decoration::Color::Orange, 8},
1890 {Decoration::Start, 1}}});
1891 },
1892 [](Generate& generator) {
1893 generator.setFlag(Generate::RegularStartEnd);
1894 generator.setFlag(Generate::FalseParity);
1895 generator.generate(
1896 5, 5,
1897 {{{Decoration::Dot_Intersection, 36},
1898 {Decoration::Triangle | Decoration::Color::Orange, 7},
1899 {Decoration::Eraser | Decoration::Color::White, 1}}});
1900 },
1901 [](Generate& generator) {
1902 generator.setFlag(Generate::RegularStartEnd);
1903 generator.setFlag(Generate::SmallShapes);
1904 generator.generate(
1905 5, 5,
1906 {{{Decoration::Poly | Decoration::Can_Rotate |
1907 Decoration::Color::Orange,
1908 3},
1909 {Decoration::Poly | Decoration::Can_Rotate |
1910 Decoration::Color::Magenta,
1911 2},
1912 {Decoration::Star | Decoration::Color::Orange, 4},
1913 {Decoration::Star | Decoration::Color::Magenta, 5}}});
1914 },
1915 };
1916 45
1917 Generate generator; 46 Generate generator;
1918 47