From 1e34d9d675a50f1ccc1a43d3c2fed94ba3e5351b Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Tue, 12 Dec 2023 14:48:42 -0500 Subject: Removed some trivial puzzles --- generator/generator.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'generator/generator.cpp') diff --git a/generator/generator.cpp b/generator/generator.cpp index 49018c8..0639492 100644 --- a/generator/generator.cpp +++ b/generator/generator.cpp @@ -374,6 +374,10 @@ void generator::run() { for (size_t f_id2 : all_forms) { if (f_id1 != f_id2) { Form& form = forms_.at(f_id1); + Form& form2 = forms_.at(f_id2); + if (form.anagram_set_id == form2.anagram_set_id) { + continue; + } form.puzzles[kYellowTop].insert(f_id2); } } @@ -427,6 +431,9 @@ void generator::run() { for (size_t f_id1 : pronunciation.form_ids) { for (size_t f_id2 : all_forms) { Form& form = forms_.at(f_id1); + if (form.reverse_form_id == f_id2) { + continue; + } form.puzzles[kBlackTop].insert(f_id2); } } @@ -573,6 +580,12 @@ void generator::run() { for (size_t mero_form_id : merophone.form_ids) { Form& mero_form = forms_.at(mero_form_id); + if (holo_form.text.find(mero_form.text) != + std::string::npos) { + // We don't want top puzzles that are also middle puzzles. + continue; + } + bool word_overlap = false; for (size_t holo_word_id : holo_form.word_ids) { for (size_t mero_word_id : mero_form.word_ids) { -- cgit 1.4.1