diff options
Diffstat (limited to 'ext/wittle_generator/Test.cpp')
-rw-r--r-- | ext/wittle_generator/Test.cpp | 47 |
1 files changed, 34 insertions, 13 deletions
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 | ||
3 | int main(int, char**) { | 11 | int 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 | } |