summary refs log tree commit diff stats
path: root/generator/generator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'generator/generator.cpp')
-rw-r--r--generator/generator.cpp18
1 files changed, 18 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...",