diff options
Diffstat (limited to 'generator')
-rw-r--r-- | generator/generator.cpp | 18 | ||||
-rw-r--r-- | generator/generator.h | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/generator/generator.cpp b/generator/generator.cpp index b13dea2..7263591 100644 --- a/generator/generator.cpp +++ b/generator/generator.cpp | |||
@@ -901,6 +901,24 @@ void generator::run() { | |||
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
904 | // Color is (for The Steady) | ||
905 | { | ||
906 | std::list<std::string> lines(readFile(datadirPath_ / "steady.txt")); | ||
907 | |||
908 | hatkirby::progress ppgs("Generating The Steady puzzles...", lines.size()); | ||
909 | for (const std::string& line : lines) { | ||
910 | ppgs.update(); | ||
911 | |||
912 | auto parts = hatkirby::split<std::vector<std::string>>(line, ","); | ||
913 | size_t word_id = LookupOrCreateWord(parts[0]); | ||
914 | size_t color_id = LookupOrCreateWord(parts[1]); | ||
915 | const Word& color_word = words_[color_id]; | ||
916 | const Word& word_word = words_[word_id]; | ||
917 | Form& word_form = forms_[word_word.base_form_id]; | ||
918 | word_form.puzzles[kColorIs].insert(color_word.base_form_id); | ||
919 | } | ||
920 | } | ||
921 | |||
904 | FindComboPuzzles("Generating purple middle red middle combo puzzles...", | 922 | FindComboPuzzles("Generating purple middle red middle combo puzzles...", |
905 | kPurpleMiddle, kRedMiddle); | 923 | kPurpleMiddle, kRedMiddle); |
906 | FindComboPuzzles("Generating purple top purple top combo puzzles...", | 924 | FindComboPuzzles("Generating purple top purple top combo puzzles...", |
diff --git a/generator/generator.h b/generator/generator.h index cf304ea..21774d7 100644 --- a/generator/generator.h +++ b/generator/generator.h | |||
@@ -27,6 +27,7 @@ enum PuzzleType { | |||
27 | kBlueBottom = 13, | 27 | kBlueBottom = 13, |
28 | kPurpleTop = 14, | 28 | kPurpleTop = 14, |
29 | kPurpleMiddle = 15, | 29 | kPurpleMiddle = 15, |
30 | kColorIs = 16, | ||
30 | }; | 31 | }; |
31 | 32 | ||
32 | class generator { | 33 | class generator { |