From 691e37d46f55c36d85f82d261f002bb03b82f11b Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 2 Dec 2023 11:37:45 -0500 Subject: Cleared out old stuff --- .gitmodules | 3 - CMakeLists.txt | 13 - data/paintings.txt | 29 ++ generator.cpp | 810 ----------------------------------------------------- generator.h | 277 ------------------ main.cpp | 669 ------------------------------------------- paintings.txt | 29 -- vendor/verbly | 1 - 8 files changed, 29 insertions(+), 1802 deletions(-) delete mode 100644 CMakeLists.txt create mode 100644 data/paintings.txt delete mode 100644 generator.cpp delete mode 100644 generator.h delete mode 100644 main.cpp delete mode 100644 paintings.txt delete mode 160000 vendor/verbly diff --git a/.gitmodules b/.gitmodules index 043d581..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "vendor/verbly"] - path = vendor/verbly - url = https://git.fourisland.com/verbly diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 99592cb..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -cmake_minimum_required (VERSION 3.1) -project (lingo_randomizer) - -set(CMAKE_BUILD_TYPE Debug) - -add_subdirectory(vendor/verbly) - -include_directories(vendor/verbly/lib) - -add_executable(lingo_randomizer main.cpp generator.cpp) -set_property(TARGET lingo_randomizer PROPERTY CXX_STANDARD 17) -set_property(TARGET lingo_randomizer PROPERTY CXX_STANDARD_REQUIRED ON) -target_link_libraries(lingo_randomizer verbly) diff --git a/data/paintings.txt b/data/paintings.txt new file mode 100644 index 0000000..f91a808 --- /dev/null +++ b/data/paintings.txt @@ -0,0 +1,29 @@ +beach,beach,0 +bg_bg4,clouds,0 +bg_bookshelf,bookshelf,0 +bg_candle,candle,0 +bg_egg,egg,0 +bg_fish,fish,0 +bg_halloween_2,pumpkin,0 +bg_knight,knight,0 +bg_scorpion,scorpion,0 +bg_thanksgiving,turkey,0 +catlike,cat,0 +crown,crown,0 +emmy,nest,0 +ether,rocket ship,0 +hatkirby,shooting star,0 +icy,parrot,0 +ig_note,note,0 +ig_rose,rose,0 +kiwi,kiwi,0 +ninjonicx_square,spiral,0 +rainbow,rainbow,0 +rever,fishbowl,0 +tree,tree,0 +yinyang,yinyang,0 +eight,eight,59 +north,north,44 +east,east,48 +south,south,47 +west,west,46 \ No newline at end of file diff --git a/generator.cpp b/generator.cpp deleted file mode 100644 index 8334904..0000000 --- a/generator.cpp +++ /dev/null @@ -1,810 +0,0 @@ -#include "generator.h" -#include -#include -#include -#include -#include - -verbly::filter Generator::MakeHintFilter(verbly::filter subfilter, Height height, Colour colour, FilterDirection filter_direction) const -{ - switch (colour) { - case kWhite: { - switch (height) { - case kBottom: { - return (verbly::word::synonyms %= subfilter); - } - case kTop: { - return (verbly::form::pronunciations %= - verbly::filter("homophones", false, - (verbly::pronunciation::forms %= (subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id))))); - } - case kMiddle: { - return subfilter; - } - default: break; // Not supported yet. - } - break; - } - case kBlack: { - switch (height) { - case kBottom: { - return (verbly::word::antonyms %= subfilter); - } - case kMiddle: { - return (verbly::form::antogram %= subfilter); - } - case kTop: { - return (verbly::pronunciation::antophone %= subfilter); - } - default: break; // Not supported yet. - } - break; - } - case kBrown: { - break; // Not supported yet. - } - case kRed: { - switch (height) { - case kTop: { - if (filter_direction == kTowardSolution) - { - return (verbly::pronunciation::merophones %= subfilter); - } else { - return (verbly::pronunciation::holophones %= subfilter); - } - } - case kMiddle: { - if (filter_direction == kTowardSolution) - { - return (verbly::form::merographs %= subfilter); - } else { - return (verbly::form::holographs %= subfilter); - } - } - case kBottom: { - if (filter_direction == kTowardSolution) - { - return (verbly::notion::partMeronyms %= - verbly::filter("partMeronyms", false, - subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id))); - } else { - return (verbly::notion::partHolonyms %= - verbly::filter("partHolonyms", false, - subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id))); - } - } - default: break; // Not supported yet. - } - break; - } - case kBlue: { - switch (height) { - case kTop: { - if (filter_direction == kTowardSolution) - { - return (verbly::pronunciation::holophones %= subfilter); - } else { - return (verbly::pronunciation::merophones %= subfilter); - } - } - case kMiddle: { - if (filter_direction == kTowardSolution) - { - return (verbly::form::holographs %= subfilter); - } else { - return (verbly::form::merographs %= subfilter); - } - } - case kBottom: { - if (filter_direction == kTowardSolution) - { - return (verbly::notion::partHolonyms %= - verbly::filter("partHolonyms", false, - subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id))); - } else { - return (verbly::notion::partMeronyms %= - verbly::filter("partMeronyms", false, - subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id))); - } - } - default: break; // Not supported yet. - } - break; - } - case kPurple: { - switch (height) { - case kMiddle: { - return (verbly::form::holographs %= - verbly::filter("midpurp", false, - (verbly::form::length >= 4 && (verbly::form::merographs %= - (subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id)))))); - } - case kTop: { - return (verbly::pronunciation::rhymes %= subfilter); - } - default: break; // Not supported yet. - } - break; - } - case kYellow: { - switch (height) { - case kTop: { - return (verbly::pronunciation::anaphones %= (subfilter && verbly::filter( - verbly::pronunciation::id, - verbly::filter::comparison::field_does_not_equal, - verbly::pronunciation::id))); - } - case kMiddle: { - return (verbly::form::anagrams %= (subfilter && verbly::filter( - verbly::form::id, - verbly::filter::comparison::field_does_not_equal, - verbly::form::id))); - } - default: break; // Not supported yet. - } - break; - } - case kGreen: { - if (filter_direction == kTowardSolution) - { - switch (height) { - case kBottom: { - verbly::filter whitelist = - (verbly::notion::wnid == 109287968) // Geological formations - || (verbly::notion::wnid == 109208496) // Asterisms (collections of stars) - || (verbly::notion::wnid == 109239740) // Celestial bodies - || (verbly::notion::wnid == 109277686) // Exterrestrial objects (comets and meteroids) - || (verbly::notion::wnid == 109403211) // Radiators (supposedly natural radiators but actually these are just pictures of radiators) - || (verbly::notion::wnid == 109416076) // Rocks - || (verbly::notion::wnid == 105442131) // Chromosomes - || (verbly::notion::wnid == 100324978) // Tightrope walking - || (verbly::notion::wnid == 100326094) // Rock climbing - || (verbly::notion::wnid == 100433458) // Contact sports - || (verbly::notion::wnid == 100433802) // Gymnastics - || (verbly::notion::wnid == 100439826) // Track and field - || (verbly::notion::wnid == 100440747) // Skiing - || (verbly::notion::wnid == 100441824) // Water sport - || (verbly::notion::wnid == 100445351) // Rowing - || (verbly::notion::wnid == 100446980) // Archery - // TODO: add more sports - || (verbly::notion::wnid == 100021939) // Artifacts - || (verbly::notion::wnid == 101471682) // Vertebrates - ; - - verbly::filter blacklist = - (verbly::notion::wnid == 106883725) // swastika - || (verbly::notion::wnid == 104416901) // tetraskele - || (verbly::notion::wnid == 102512053) // fish - || (verbly::notion::wnid == 103575691) // instrument of execution - || (verbly::notion::wnid == 103829563) // noose - || (verbly::notion::wnid == 103663910) // life support - ; - - return subfilter - && (verbly::notion::fullHypernyms %= whitelist) - && !(verbly::notion::fullHypernyms %= blacklist) - && (verbly::notion::partOfSpeech == verbly::part_of_speech::noun) - && (verbly::notion::numOfImages >= 1); - } - case kMiddle: { - return subfilter; - } - default: break; // Never supported. - } - } else { - return (verbly::form::text == "picture"); - } - break; - } - default: break; // Not supported yet. - } - return {}; -} - -std::string ApplyWanderlust(const std::string& word) { - std::string result; - for (char ch : word) { - if (ch == 'w') { - result += '1'; - } else if (ch == 'a') { - result += '2'; - } else if (ch == 'n') { - result += '3'; - } else if (ch == 'd') { - result += '4'; - } else if (ch == 'e') { - result += '5'; - } else if (ch == 'r') { - result += '6'; - } else if (ch == 'l') { - result += '7'; - } else if (ch == 'u') { - result += '8'; - } else if (ch == 's') { - result += '9'; - } else if (ch == 't') { - result += '0'; - } else if (ch == ' ') { - result += ' '; - } - } - return result; -} - -void Generator::GenerateStaticPanel(std::string name, std::string question, std::string answer) { - SavePanel(name, question, answer.empty() ? question : answer, {}); -} - -void Generator::GenerateSinglePanel(std::string name, Height height, Colour colour, GenerateOptions options) { - while (!GenerateSinglePanelImpl(name, height, colour, options)); -} - -bool Generator::GenerateSinglePanelImpl(std::string name, Height height, Colour colour, GenerateOptions options) { - verbly::form solution; - if (options.reuse_solution) { - const std::string& word = reusable_.at(std::uniform_int_distribution(0, reusable_.size()-1)(rng_)); - if (options.max_answer_len > 0 && word.size() > options.max_answer_len) return false; - solution = database_->forms(verbly::form::text == word).first(); - } else { - verbly::filter forward = MakeHintFilter({}, height, colour, kTowardSolution); - if (options.must_be_broad) { - forward &= MakeHintFilter({}, kBottom, kWhite, kTowardSolution); - forward &= MakeHintFilter({}, kBottom, kRed, kTowardSolution); - forward &= MakeHintFilter({}, kBottom, kBlue, kTowardSolution); - } - std::vector solutions = database_->forms(forward && GetWordFilter(kTowardSolution, options)).all(); - solution = solutions.front();//solutions.at(std::uniform_int_distribution(0, solutions.size())(rng_)); - } - - if (!options.unique_pool.empty() && pools_[options.unique_pool].count(solution.getText())) { - return false; - } - if (options.palindrome != kPalindromeUnspecified) { - std::string reversed = solution.getText(); - std::reverse(reversed.begin(), reversed.end()); - - if ((options.palindrome == kForcePalindrome && reversed != solution.getText()) || - (options.palindrome == kRejectPalindrome && reversed == solution.getText())) { - return false; - } - } - - // Finish early if this is a middle white. - if (height == kMiddle && colour == kWhite) { - SavePanel(name, solution.getText(), solution.getText(), options); - if (!options.copy_to.empty()) { - SavePanel(options.copy_to, solution.getText(), solution.getText(), options); - } - if (!options.copy_hidden.empty()) { - SavePanel(options.copy_hidden, std::string(solution.getText().size(), '?'), solution.getText(), options); - } - return true; - } - - verbly::filter questionFilter = MakeHintFilter(solution, height, colour, kTowardQuestion); - std::vector questions = database_->forms(questionFilter && GetWordFilter(kTowardQuestion, options)).all();//, verbly::order(verbly::form::id), 0).all(); - if (questions.size() < 1) return false; - verbly::form question = questions.front();// questions.at(std::uniform_int_distribution(0, questions.size())(rng_)); - - if (IsClueTrivial(height, colour, question, solution, options)) { - return false; - } - if (options.max_len_diff >= 0 && std::abs(static_cast(question.getText().size() - solution.getText().size())) > options.max_len_diff) { - return false; - } - - SavePanel(name, question.getText(), solution.getText(), options); - if (!options.copy_to.empty()) { - SavePanel(options.copy_to, question.getText(), solution.getText(), options); - } - - return true; -} - -void Generator::GenerateDoublePanel(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options) { - while (!GenerateDoublePanelImpl(name1, name2, height, colour, options)); -} - -bool Generator::GenerateDoublePanelImpl(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options) { - verbly::form solution; - if (options.reuse_solution) { - const std::string& word = reusable_.at(std::uniform_int_distribution(0, reusable_.size()-1)(rng_)); - if (options.max_answer_len > 0 && word.size() > options.max_answer_len) return false; - solution = database_->forms(verbly::form::text == word).first(); - } else { - verbly::filter forward = MakeHintFilter({}, height, colour, kTowardSolution); - if (options.must_be_broad) { - forward &= MakeHintFilter({}, kBottom, kWhite, kTowardSolution); - forward &= MakeHintFilter({}, kBottom, kRed, kTowardSolution); - forward &= MakeHintFilter({}, kBottom, kBlue, kTowardSolution); - } - std::vector solutions = database_->forms(forward && GetWordFilter(kTowardSolution, options)).all(); - solution = solutions.front();//solutions.at(std::uniform_int_distribution(0, solutions.size())(rng_)); - } - - if (!options.unique_pool.empty() && pools_[options.unique_pool].count(solution.getText())) { - return false; - } - - // Finish early if this is a middle white. - if (height == kMiddle && colour == kWhite) { - SavePanel(name1, solution.getText(), solution.getText(), options); - SavePanel(name2, solution.getText(), solution.getText(), options); - return true; - } - - verbly::filter questionFilter = MakeHintFilter(solution, height, colour, kTowardQuestion); - std::vector questions = database_->forms(questionFilter && GetWordFilter(kTowardQuestion, options), {}, 2).all(); - if (questions.size() < 2) return false; - - //std::shuffle(questions.begin(), questions.end(), rng_); - - if (IsClueTrivial(height, colour, questions[0], solution, options) || IsClueTrivial(height, colour, questions[1], solution, options)) { - return false; - } - if (options.max_len_diff >= 0) { - if (std::abs(static_cast(questions[0].getText().size() - solution.getText().size())) > options.max_len_diff - || std::abs(static_cast(questions[1].getText().size() - solution.getText().size())) > options.max_len_diff) { - return false; - } - } - - SavePanel(name1, questions[0].getText(), solution.getText(), options); - SavePanel(name2, questions[1].getText(), solution.getText(), options); - - return true; -} - -void Generator::GenerateCohintedPanels(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options) { - while (!GenerateCohintedPanelsImpl(name1, name2, height, colour, options)); -} - -bool Generator::GenerateCohintedPanelsImpl(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options) { - verbly::filter backward = MakeHintFilter({}, height, colour, kTowardQuestion); - std::vector questions = database_->forms(backward && GetWordFilter(kTowardQuestion, options)).all();//, verbly::order(verbly::form::id), 0).all(); - verbly::form question = questions.front();// solutions.at(std::uniform_int_distribution(0, solutions.size())(rng_)); - - // Finish early if this is a middle white. - if (height == kMiddle && colour == kWhite) { - SavePanel(name1, question.getText(), question.getText(), options); - SavePanel(name2, question.getText(), question.getText(), options); - return true; - } - - verbly::filter solutionFilter = MakeHintFilter(question, height, colour, kTowardSolution); - std::vector solutions = database_->forms(solutionFilter && GetWordFilter(kTowardSolution, options), {}, 2).all(); - if (solutions.size() < 2) return false; - - //std::shuffle(questions.begin(), questions.end(), rng_); - - if (IsClueTrivial(height, colour, question, solutions[0], options) - || IsClueTrivial(height, colour, question, solutions[1], options)) { - return false; - } - if (options.max_len_diff >= 0) { - if (std::abs(static_cast(question.getText().size() - solutions[0].getText().size())) > options.max_len_diff - || std::abs(static_cast(question.getText().size() - solutions[1].getText().size())) > options.max_len_diff) { - return false; - } - } - - SavePanel(name1, question.getText(), solutions[0].getText(), options); - SavePanel(name2, question.getText(), solutions[1].getText(), options); - - return true; -} - -void Generator::GeneratePairedPanels(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options) { - while (!GeneratePairedPanelsImpl(name1, name2, height, colour, options)); -} - -bool Generator::GeneratePairedPanelsImpl(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options) { - Colour effectiveColour = (height == kMiddle && colour == kWhite) ? kBlack : colour; - Height effectiveHeight = (height == kMiddle && colour == kWhite) ? kBottom : height; - - verbly::filter forward = MakeHintFilter({}, effectiveHeight, effectiveColour, kTowardSolution); - std::vector solutions = database_->forms(forward && GetWordFilter(kTowardSolution, options)).all(); - verbly::form solution = solutions.front();//solutions.at(std::uniform_int_distribution(0, solutions.size())(rng_)); - - verbly::filter questionFilter = MakeHintFilter(solution, effectiveHeight, effectiveColour, kTowardQuestion); - std::vector questions = database_->forms(questionFilter && GetWordFilter(kTowardQuestion, options)).all();//, verbly::order(verbly::form::id), 0).all(); - if (questions.size() < 1) return false; - verbly::form question = questions.front();// questions.at(std::uniform_int_distribution(0, questions.size())(rng_)); - - if (IsClueTrivial(height, effectiveColour, question, solution, options)) { - return false; - } - - if (options.palindrome != kPalindromeUnspecified) { - std::string reversed = question.getText(); - std::reverse(reversed.begin(), reversed.end()); - - if ((options.palindrome == kForcePalindrome && reversed != question.getText()) || - (options.palindrome == kRejectPalindrome && reversed == question.getText())) { - return false; - } - } - - if (options.max_len_diff >= 0) { - if (std::abs(static_cast(question.getText().size() - solution.getText().size())) > options.max_len_diff) { - return false; - } - } - - if (height == kMiddle && colour == kWhite) { - SavePanel(name1, question.getText(), question.getText(), options); - SavePanel(name2, solution.getText(), solution.getText(), options); - if (!options.copy_to.empty() && !options.copy_to2.empty()) { - SavePanel(options.copy_to, question.getText(), question.getText(), options); - SavePanel(options.copy_to2, solution.getText(), solution.getText(), options); - } - } else { - SavePanel(name1, question.getText(), solution.getText(), options); - SavePanel(name2, solution.getText(), question.getText(), options); - if (!options.copy_to.empty() && !options.copy_to2.empty()) { - SavePanel(options.copy_to, question.getText(), solution.getText(), options); - SavePanel(options.copy_to2, solution.getText(), question.getText(), options); - } - } - - return true; -} - -void Generator::GeneratePanelStack(std::string top_name, Colour top_colour, std::string middle_name, Colour middle_colour, std::string bottom_name, Colour bottom_colour, GenerateOptions options) { - while (!GeneratePanelStackImpl(top_name, top_colour, middle_name, middle_colour, bottom_name, bottom_colour, options)); -} - -bool Generator::GeneratePanelStackImpl(std::string top_name, Colour top_colour, std::string middle_name, Colour middle_colour, std::string bottom_name, Colour bottom_colour, GenerateOptions options) { - verbly::form solution; - if (options.reuse_solution) { - const std::string& word = reusable_.at(std::uniform_int_distribution(0, reusable_.size()-1)(rng_)); - if (options.max_answer_len > 0 && word.size() > options.max_answer_len) return false; - solution = database_->forms(verbly::form::text == word).first(); - } else { - verbly::filter forward = GetWordFilter(kTowardSolution, options); - if (!top_name.empty()) { - forward &= MakeHintFilter({}, kTop, top_colour, kTowardSolution); - } - if (!middle_name.empty()) { - forward &= MakeHintFilter({}, kMiddle, middle_colour, kTowardSolution); - } - if (!bottom_name.empty()) { - forward &= MakeHintFilter({}, kBottom, bottom_colour, kTowardSolution); - } - std::vector solutions = database_->forms(forward).all(); - solution = solutions.front();//solutions.at(std::uniform_int_distribution(0, solutions.size())(rng_)); - } - - if (!options.unique_pool.empty() && pools_[options.unique_pool].count(solution.getText())) { - return false; - } - - std::string top_hint; - std::string middle_hint; - std::string bottom_hint; - - if (!top_name.empty()) { - verbly::filter questionFilter = MakeHintFilter(solution, kTop, top_colour, kTowardQuestion); - std::vector questions = database_->forms(questionFilter && GetWordFilter(kTowardQuestion, options), {}, 1).all(); - if (questions.empty()) return false; - top_hint = questions.front().getText(); - - if (IsClueTrivial(kTop, top_colour, questions.front(), solution, options)) { - return false; - } - } - - if (!middle_name.empty()) { - verbly::filter questionFilter = MakeHintFilter(solution, kMiddle, middle_colour, kTowardQuestion); - std::vector questions = database_->forms(questionFilter && GetWordFilter(kTowardQuestion, options), {}, 1).all(); - if (questions.empty()) return false; - middle_hint = questions.front().getText(); - - if (IsClueTrivial(kMiddle, middle_colour, questions.front(), solution, options)) { - return false; - } - } - - if (!bottom_name.empty()) { - verbly::filter questionFilter = MakeHintFilter(solution, kBottom, bottom_colour, kTowardQuestion); - std::vector questions = database_->forms(questionFilter && GetWordFilter(kTowardQuestion, options), {}, 1).all(); - if (questions.empty()) return false; - bottom_hint = questions.front().getText(); - - if (IsClueTrivial(kBottom, bottom_colour, questions.front(), solution, options)) { - return false; - } - } - - if (!top_name.empty()) { - SavePanel(top_name, top_hint, solution.getText(), options); - } - if (!middle_name.empty()) { - SavePanel(middle_name, middle_hint, solution.getText(), options); - } - if (!bottom_name.empty()) { - SavePanel(bottom_name, bottom_hint, solution.getText(), options); - } - - return true; -} - -void Generator::GenerateOrangeNumberPanel(std::string name) { - std::string solution = wanderlust_->GetWord(rng_); - std::string question = ApplyWanderlust(solution); - - SavePanel(name, question, solution); -} - -void Generator::GenerateOrangeWordPanel(std::string name) { - std::string question = wanderlust_->GetWord(rng_); - std::string solution = ApplyWanderlust(question); - - SavePanel(name, question, solution); -} - -void Generator::GenerateOrangeAdditionPanel(std::string name) { - auto [question, solution] = wanderlust_->GetPuzzle(rng_); - - SavePanel(name, question, solution); -} - -void Generator::GenerateOneRoadManyTurns(std::string order_name, std::string part1_name, std::string part2_name, std::string part3_name, std::string part4_name) { - const auto& [part1_q, part1_a] = panels_.at(part1_name); - const auto& [part2_q, part2_a] = panels_.at(part2_name); - const auto& [part3_q, part3_a] = panels_.at(part3_name); - const auto& [part4_q, part4_a] = panels_.at(part4_name); - - SavePanel(order_name, "order", part1_a + " " + part2_a + " " + part3_a + " " + part4_a); -} - -void Generator::GenerateComboPanel(std::string name, Height left_height, Colour left_colour, Height right_height, Colour right_colour, GenerateOptions options) { - while (!GenerateComboPanelImpl(name, left_height, left_colour, right_height, right_colour, options)); -} - -bool Generator::GenerateComboPanelImpl(std::string name, Height left_height, Colour left_colour, Height right_height, Colour right_colour, GenerateOptions options) { - options.force_two_words = true; - - verbly::form solution = database_->forms(GetWordFilter(kTowardSolution, options)).first(); - std::string soltext = solution.getText(); - int spacepos = soltext.find(" "); - std::string leftword = soltext.substr(0, spacepos); - std::string rightword = soltext.substr(spacepos+1); - - options.force_two_words = false; - verbly::filter left_filter = MakeHintFilter(verbly::form::text == leftword, left_height, left_colour, kTowardQuestion); - std::vector left_questions = database_->forms(left_filter && GetWordFilter(kTowardQuestion, options)).all(); - if (left_questions.size() < 1) return false; - verbly::form left_question = left_questions.front(); - - verbly::filter right_filter = MakeHintFilter(verbly::form::text == rightword, right_height, right_colour, kTowardQuestion); - std::vector right_questions = database_->forms(right_filter && GetWordFilter(kTowardQuestion, options)).all(); - if (right_questions.size() < 1) return false; - verbly::form right_question = right_questions.front(); - - SavePanel(name, left_question.getText() + " " + right_question.getText(), soltext, options); - - return true; -} - -void Generator::GenerateCrossTower( - std::string north_tower_name, - std::string south_tower_name, - std::string east_tower_name, - std::string west_tower_name, - std::string north_lookout_name, - std::string south_lookout_name, - std::string east_lookout_name, - std::string west_lookout_name, - std::string north_other_name1, - std::string north_other_name2, - std::string north_other_name3, - std::string south_other_name1, - std::string south_other_name2, - std::string south_other_name3, - std::string east_other_name1, - std::string east_other_name2, - std::string east_other_name3, - std::string west_other_name1, - std::string west_other_name2, - std::string west_other_name3) -{ - std::vector> sets = cross_tower_->GetPuzzleSet(rng_); - - SavePanel(north_tower_name, "", sets[0][0]); - SavePanel(north_lookout_name, "", sets[0][0]); - SavePanel(north_other_name1, sets[0][1], sets[0][1]); - SavePanel(north_other_name2, sets[0][2], sets[0][2]); - SavePanel(north_other_name3, sets[0][3], sets[0][3]); - - SavePanel(south_tower_name, "", sets[1][0]); - SavePanel(south_lookout_name, "", sets[1][0]); - SavePanel(south_other_name1, sets[1][1], sets[1][1]); - SavePanel(south_other_name2, sets[1][2], sets[1][2]); - SavePanel(south_other_name3, sets[1][3], sets[1][3]); - - SavePanel(east_tower_name, "", sets[2][0]); - SavePanel(east_lookout_name, "", sets[2][0]); - SavePanel(east_other_name1, sets[2][1], sets[2][1]); - SavePanel(east_other_name2, sets[2][2], sets[2][2]); - SavePanel(east_other_name3, sets[2][3], sets[2][3]); - - SavePanel(west_tower_name, "", sets[3][0]); - SavePanel(west_lookout_name, "", sets[3][0]); - SavePanel(west_other_name1, sets[3][1], sets[3][1]); - SavePanel(west_other_name2, sets[3][2], sets[3][2]); - SavePanel(west_other_name3, sets[3][3], sets[3][3]); -} - -void Generator::GeneratePaintingPuzzle(std::string panel_name, std::string painting_name) { - std::string node_name; - std::string answer; - int resource_id = 0; - - for (;;) { - std::tie(node_name, answer, resource_id) = paintings_->GetPainting(rng_); - if (!used_paintings_.count(node_name)) { - break; - } - } - - used_paintings_.insert(node_name); - - SavePanel(panel_name, "painting", answer, {}); - - std::string resource_path = std::string("res://nodes/paintings/") + node_name + ".tscn"; - if (resource_id == 0) { - resources_.emplace_back(resource_path, "PackedScene"); - } - - replace_nodes_[painting_name] = {resource_path, resource_id}; -} - -void Generator::SavePanel(std::string name, std::string question, std::string answer, GenerateOptions options) { - if (options.save_for_later) { - reusable_.push_back(answer); - } - - if (!options.unique_pool.empty()) { - pools_[options.unique_pool].insert(answer); - } - - if (options.obscure_hint) { - int numToObscure = (question.size()/3 > 0) ? std::uniform_int_distribution(1, question.size()/3)(rng_) : 1; - std::vector indicies(question.size()); - std::iota(indicies.begin(), indicies.end(), 0); - std::shuffle(indicies.begin(), indicies.end(), rng_); - - for (int i=0; i 0) { - wordFilter &= (verbly::form::length == options.exact_len); - } else if (dir == kTowardSolution && options.max_answer_len > 0) { - wordFilter &= (verbly::form::length <= options.max_answer_len); - } else if (dir == kTowardQuestion && options.max_hint_len > 0) { - wordFilter &= (verbly::form::length <= options.max_hint_len); - } else { - wordFilter &= (verbly::form::length <= 11); - } - - if (options.exact_len == 0) { - wordFilter &= (verbly::form::length >= 3); - } - - if (!options.multiword) { - if (options.force_two_words) { - wordFilter &= (verbly::form::complexity == 2); - } else { - wordFilter &= (verbly::form::complexity == 1); - wordFilter &= (verbly::form::frequency > 2000000); - } - } else { - wordFilter &= ((verbly::form::complexity > 1) || (verbly::form::frequency > 2000000)); - } - - return wordFilter; -} - -bool isDigitWrapper(unsigned char ch) { - return std::isdigit(ch); -} - -bool Generator::IsClueTrivial(Height height, Colour colour, const verbly::form& clue, const verbly::form& solution, GenerateOptions options) const -{ - if (!options.allow_top_expansion && height == kTop) { - verbly::filter questionFilter = MakeHintFilter(solution, kMiddle, colour, kTowardQuestion) && clue; - if (!database_->forms(questionFilter).all().empty()) { - return true; - } - } - - if (height == kTop && colour == kWhite) - { - return !database_->forms((verbly::filter)clue && (verbly::word::synonyms %= solution)).all().empty(); - } else if (height == kBottom && colour == kWhite) - { - return !database_->forms((verbly::filter)clue && (verbly::form::pronunciations %= solution)).all().empty(); - } else if (height == kBottom && colour == kBlack) - { - return !database_->forms((verbly::filter)clue && (verbly::form::merographs %= solution)).all().empty() - || !database_->forms((verbly::filter)clue && (verbly::form::holographs %= solution)).all().empty(); - } else if ((height == kMiddle || height == kTop) && colour == kPurple) - { - return (clue.getId() == solution.getId()) - || !database_->forms((verbly::filter)clue && (verbly::form::merographs %= solution)).all().empty() - || !database_->forms((verbly::filter)clue && (verbly::form::holographs %= solution)).all().empty(); - } else if (height == kMiddle && colour == kRed) { - if (clue.getComplexity() == 2 && solution.getComplexity() == 1) { - auto words = hatkirby::split>(clue.getText(), " "); - for (const auto& word : words) { - if (word == solution.getText()) { - return true; - } - } - } - } else if (height == kMiddle && colour == kYellow) { - if (clue.getComplexity() == solution.getComplexity()) { - auto clueWords = hatkirby::split>(clue.getText(), " "); - auto solutionWords = hatkirby::split>(solution.getText(), " "); - std::sort(clueWords.begin(), clueWords.end()); - std::sort(solutionWords.begin(), solutionWords.end()); - if (clueWords == solutionWords) { - return true; - } - } - } else if (height == kTop && colour == kYellow) { - std::set hint_stressless; - for (const verbly::pronunciation& pronunciation : clue.getPronunciations()) { - std::string stressed = hatkirby::implode(pronunciation.getPhonemes(), " "); - std::string stressless; - std::remove_copy_if(stressed.begin(), stressed.end(), std::back_inserter(stressless), &isDigitWrapper); - hint_stressless.insert(stressless); - } - for (const verbly::pronunciation& pronunciation : solution.getPronunciations()) { - std::string stressed = hatkirby::implode(pronunciation.getPhonemes(), " "); - std::string stressless; - std::remove_copy_if(stressed.begin(), stressed.end(), std::back_inserter(stressless), &isDigitWrapper); - if (hint_stressless.count(stressless)) { - return true; - } - } - } - return false; -} diff --git a/generator.h b/generator.h deleted file mode 100644 index d0333a6..0000000 --- a/generator.h +++ /dev/null @@ -1,277 +0,0 @@ -#ifndef GENERATOR_H_811386CE -#define GENERATOR_H_811386CE - -#include -#include -#include -#include -#include -#include -#include - -enum Height { - kTop, - kMiddle, - kBottom, - kHeightCount -}; - -enum Colour { - kWhite, - kBlack, - kRed, - kBlue, - kPurple, - kBrown, - kYellow, - kGreen, - kOrange, - kColourCount -}; - -enum FilterDirection { - kTowardSolution, - kTowardQuestion -}; - -enum PalindromeQuery { - kPalindromeUnspecified, - kForcePalindrome, - kRejectPalindrome -}; - -struct GenerateOptions { - bool obscure_hint = false; - int max_answer_len = 0; - int max_hint_len = 0; - int exact_len = 0; - int max_len_diff = -1; // supported by single, double, paired, cohinted - bool multiword = false; - bool save_for_later = false; - bool reuse_solution = false; // supported by single, double, and stack - std::string unique_pool; // supported by single, double, and stack - PalindromeQuery palindrome = kPalindromeUnspecified; // only important for middle black. supported by single and paired - std::string copy_to; // supported by single and paired - std::string copy_to2; // supported by paired - std::string copy_hidden; // supported by single mid white - bool force_two_words = false; - bool must_be_broad = false; // the solution must also be gettable by bottom white/red/blue. supported by single and double - bool allow_top_expansion = false; // this disables the triviality check that top puzzles can't also apply to middle -}; - -class Wanderlust { -public: - Wanderlust(const std::string& words_filename, const std::string& puzzles_filename) { - std::ifstream words_file(words_filename); - std::string line; - while (std::getline(words_file, line)) { - words_.push_back(line); - } - - std::ifstream puzzles_file(puzzles_filename); - while (std::getline(puzzles_file, line)) { - std::string line2; - if (!std::getline(puzzles_file, line2)) { - throw std::invalid_argument("Wanderlust file is malformed."); - } - - puzzles_.emplace_back(line, line2); - } - } - - std::tuple GetPuzzle(std::mt19937& rng) const { - return puzzles_.at(std::uniform_int_distribution(0, puzzles_.size()-1)(rng)); - } - - const std::string& GetWord(std::mt19937& rng) const { - return words_.at(std::uniform_int_distribution(0, words_.size()-1)(rng)); - } - -private: - std::vector> puzzles_; - std::vector words_; -}; - -class CrossTower { -public: - explicit CrossTower(std::string filename) { - std::ifstream file(filename); - std::string line; - while (std::getline(file, line)) { - sets_.push_back(hatkirby::split>(line, " ")); - } - } - - std::vector> GetPuzzleSet(std::mt19937& rng) const { - std::vector> result = sets_; - std::shuffle(result.begin(), result.end(), rng); - result.resize(4); - - for (std::vector& set : result) { - std::shuffle(set.begin(), set.end(), rng); - } - - return result; - } - -private: - std::vector> sets_; -}; - -class Paintings { -public: - explicit Paintings(std::string filename) { - std::ifstream file(filename); - std::string line; - while (std::getline(file, line)) { - auto parts = hatkirby::split>(line, ","); - paintings_.emplace_back(parts[0], parts[1], std::atoi(parts[2].c_str())); - } - } - - const std::tuple& GetPainting(std::mt19937& rng) const { - return paintings_.at(std::uniform_int_distribution(0, paintings_.size()-1)(rng)); - } - -private: - std::vector> paintings_; -}; - -class Generator { -public: - - explicit Generator(unsigned int seed) : seed_(seed), rng_(seed) { - database_ = std::make_unique("/Users/hatkirby/Dropbox/Programming/verbly-datafiles/d1.3_lingo7"); - wanderlust_ = std::make_unique("../wanderlust_words.txt", "../wanderlust_puzzles.txt"); - cross_tower_ = std::make_unique("../cross_tower.txt"); - paintings_ = std::make_unique("../paintings.txt"); - } - - // Querying - bool IsPanelRandomized(const std::string& name) const { - return panels_.count(name); - } - - const std::tuple& GetPanel(const std::string& name) const { - return panels_.at(name); - } - - bool IsNodeRandomized(const std::string& name) const { - return replace_nodes_.count(name); - } - - const std::tuple& GetNode(const std::string& name) const { - return replace_nodes_.at(name); - } - - const std::vector>& GetResources() const { - return resources_; - } - - // Sets the panel's question and answer to static values. - void GenerateStaticPanel(std::string name, std::string question, std::string answer = ""); - - // Generates a one-block puzzle with the given height and colour. - void GenerateSinglePanel(std::string name, Height height, Colour colour, GenerateOptions options = {}); - - // Generates a one-block puzzle with the given height and colour, where there is a panel on two faces of the block. - // Both puzzles will have the same answer. - void GenerateDoublePanel(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options = {}); - - // Generates two puzzles with the same hint but different answers. - void GenerateCohintedPanels(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options = {}); - - // Generates two panels at once, where the question for one is the answer to the other. - // Colour must be white, black, or yellow. - // Middle white is a special case; the puzzles will be antonyms of one another. - void GeneratePairedPanels(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options = {}); - - // Generates a vertical stack of panels that all have the same answer. - // If a name is left blank, that height will be ignored. - void GeneratePanelStack(std::string top_name, Colour top_colour, std::string middle_name, Colour middle_colour, std::string bottom_name, Colour bottom_colour, GenerateOptions options = {}); - - // Generate an orange puzzle, with a number for the hint. - void GenerateOrangeNumberPanel(std::string name); - - // Generate an orange puzzle, with a word for the hint. - void GenerateOrangeWordPanel(std::string name); - - // Generate an orange puzzle, with an addition problem for the hint. - void GenerateOrangeAdditionPanel(std::string name); - - // Generates the ONE ROAD MANY TURNS panel by combining the solutions to four other panels. - void GenerateOneRoadManyTurns(std::string order_name, std::string part1_name, std::string part2_name, std::string part3_name, std::string part4_name); - - // Generates a hybrid puzzle where the solution is two words and each word is provided by a different colour/height puzzle. - void GenerateComboPanel(std::string name, Height left_height, Colour left_colour, Height right_height, Colour right_colour, GenerateOptions options = {}); - - // Generates the cross tower sets-of-four puzzles. - void GenerateCrossTower( - std::string north_tower_name, - std::string south_tower_name, - std::string east_tower_name, - std::string west_tower_name, - std::string north_lookout_name, - std::string south_lookout_name, - std::string east_lookout_name, - std::string west_lookout_name, - std::string north_other_name1, - std::string north_other_name2, - std::string north_other_name3, - std::string south_other_name1, - std::string south_other_name2, - std::string south_other_name3, - std::string east_other_name1, - std::string east_other_name2, - std::string east_other_name3, - std::string west_other_name1, - std::string west_other_name2, - std::string west_other_name3); - - // Generate a painting/panel pair. - void GeneratePaintingPuzzle(std::string panel_name, std::string painting_name); - -private: - - verbly::filter MakeHintFilter(verbly::filter subfilter, Height height, Colour colour, FilterDirection filter_direction) const; - - bool GenerateSinglePanelImpl(std::string name, Height height, Colour colour, GenerateOptions options); - - bool GenerateDoublePanelImpl(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options); - - bool GenerateCohintedPanelsImpl(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options); - - bool GeneratePairedPanelsImpl(std::string name1, std::string name2, Height height, Colour colour, GenerateOptions options); - - bool GeneratePanelStackImpl(std::string top_name, Colour top_colour, std::string middle_name, Colour middle_colour, std::string bottom_name, Colour bottom_colour, GenerateOptions options); - - bool GenerateComboPanelImpl(std::string name, Height left_height, Colour left_colour, Height right_height, Colour right_colour, GenerateOptions options); - - void SavePanel(std::string name, std::string question, std::string answer, GenerateOptions options = {}); - - verbly::filter GetWordFilter(FilterDirection direction, GenerateOptions options) const; - - bool IsClueTrivial(Height height, Colour colour, const verbly::form& clue, const verbly::form& solution, GenerateOptions options = {}) const; - - unsigned int seed_; - std::mt19937 rng_; - std::unique_ptr database_; - std::unique_ptr wanderlust_; - std::unique_ptr cross_tower_; - std::unique_ptr paintings_; - - // name, question, answer - std::map> panels_; - - // name, resource_path, resource_id (0 if needs import) - std::map> replace_nodes_; - - // path, type - std::vector> resources_; - - std::vector reusable_; - std::map> pools_; - std::set used_paintings_; -}; - -#endif /* end of include guard: GENERATOR_H_811386CE */ diff --git a/main.cpp b/main.cpp deleted file mode 100644 index ba40def..0000000 --- a/main.cpp +++ /dev/null @@ -1,669 +0,0 @@ -#include -#include -#include -#include -#include "generator.h" - -constexpr const char* kVersionStr = "0.0.1"; - -class Randomizer { -public: - - explicit Randomizer(unsigned int seed) : seed_(seed), gen_(seed) {} - - void Run() { - // Entry room - gen_.GenerateStaticPanel("Panel_hi_hi", "hewwo"); - gen_.GenerateStaticPanel("Panel_type_type", "version"); - gen_.GenerateStaticPanel("Panel_this_this", kVersionStr); - gen_.GenerateStaticPanel("Panel_write_write", "normal"); - gen_.GenerateStaticPanel("Panel_same_same", std::to_string(seed_)); - gen_.GenerateSinglePanel("Panel_hidden_hidden", kMiddle, kWhite, {.save_for_later = true}); - gen_.GenerateStaticPanel("Panel_hi_high", "goode", "good"); - gen_.GenerateStaticPanel("Panel_low_low", "serendipity", "luck"); - gen_.GenerateSinglePanel("Panel_forward_forward", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20, .save_for_later = true, .must_be_broad = true}); - gen_.GenerateSinglePanel("Panel_between_between", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20, .save_for_later = true, .must_be_broad = true}); - gen_.GenerateSinglePanel("Panel_backward_backward", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20, .save_for_later = true, .must_be_broad = true}); - gen_.GenerateSinglePanel("Panel_secret_secret", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20, .save_for_later = true, .must_be_broad = true}); - - // The Agreeable - gen_.GenerateSinglePanel("Panel_close_open", kBottom, kBlack, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_retool_looter", kMiddle, kBlack, {.save_for_later = true, .unique_pool = "agreeable", .palindrome = kRejectPalindrome}); - gen_.GenerateSinglePanel("Panel_drawer_reward", kMiddle, kBlack, {.save_for_later = true, .unique_pool = "agreeable", .palindrome = kRejectPalindrome}); - gen_.GenerateSinglePanel("Panel_read_write", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_different_same", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_bye_hi", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_low_high", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_alive_dead", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_that_this", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_stressed_desserts", kMiddle, kBlack, {.unique_pool = "agreeable", .palindrome = kRejectPalindrome, .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_star_rats", kMiddle, kBlack, {.unique_pool = "agreeable", .palindrome = kRejectPalindrome, .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_tame_mate", kTop, kBlack, {.unique_pool = "agreeable", .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_cat_tack", kTop, kBlack, {.unique_pool = "agreeable", .save_for_later = true}); - gen_.GeneratePairedPanels("Panel_leaf_feel", "Panel_feel_leaf", kTop, kBlack, {.obscure_hint = true, .save_for_later = true}); - gen_.GeneratePairedPanels("Panel_warts_straw", "Panel_straw_warts", kMiddle, kBlack, {.obscure_hint = true, .save_for_later = true, .palindrome = kRejectPalindrome}); - gen_.GeneratePairedPanels("Panel_near_far", "Panel_far_near", kBottom, kBlack, {.obscure_hint = true, .save_for_later = true}); - // Panel_left_wrong: left? wrong! - gen_.GenerateSinglePanel("Panel_black_white", kBottom, kBlack, {.max_answer_len = 7, .save_for_later = true}); - gen_.GeneratePairedPanels("Panel_left_right", "Panel_right_left", kBottom, kBlack, {.obscure_hint = true, .save_for_later = true}); - - // The Seeker - gen_.GenerateSinglePanel("Panel_entrance_entrance", kMiddle, kWhite, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker", .must_be_broad = true}); - gen_.GenerateSinglePanel("Panel_bear_bear", kMiddle, kWhite, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker", .must_be_broad = true}); - gen_.GenerateDoublePanel("Panel_mine_mine", "Panel_mine_mine_2", kMiddle, kWhite, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker", .must_be_broad = true}); - gen_.GenerateSinglePanel("Panel_bow_bow", kMiddle, kWhite, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker", .must_be_broad = true}); - gen_.GenerateSinglePanel("Panel_does_does", kMiddle, kWhite, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker", .must_be_broad = true}); - gen_.GenerateDoublePanel("Panel_mobile_mobile", "Panel_mobile_mobile_2", kMiddle, kWhite, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker", .must_be_broad = true}); - gen_.GeneratePanelStack("Panel_desert_dessert", kWhite, "Panel_desert_desert", kWhite, "", {}, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker"}); - gen_.GeneratePanelStack("Panel_sow_so", kWhite, "Panel_sow_sow", kWhite, "", {}, {.obscure_hint = true, .save_for_later = true, .unique_pool = "seeker"}); - gen_.GenerateDoublePanel("Panel_two_to", "Panel_two_too", kTop, kWhite, {.save_for_later = true, .unique_pool = "seeker"}); - gen_.GenerateSinglePanel("Panel_write_right", kTop, kWhite, {.save_for_later = true, .unique_pool = "seeker"}); - gen_.GenerateSinglePanel("Panel_you_ewe", kTop, kWhite, {.save_for_later = true, .unique_pool = "seeker"}); - gen_.GenerateDoublePanel("Panel_not_knot", "Panel_not_naught", kTop, kWhite, {.save_for_later = true, .unique_pool = "seeker"}); - gen_.GenerateSinglePanel("Panel_bear_bare", kTop, kWhite, {.save_for_later = true, .unique_pool = "seeker"}); - - // The Tenacious - gen_.GenerateSinglePanel("Panel_slaughter_laughter", kMiddle, kRed, {.unique_pool = "tenacious", .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_dread_dead", kMiddle, kRed, {.unique_pool = "tenacious", .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_massacred_sacred", kMiddle, kRed, {.unique_pool = "tenacious", .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_decay_day", kMiddle, kRed, {.unique_pool = "tenacious", .save_for_later = true}); - gen_.GeneratePairedPanels("Panel_solos_solos", "Panel_solos_solos_2", kMiddle, kBlack, {.palindrome = kForcePalindrome}); - gen_.GeneratePairedPanels("Panel_racecar_racecar", "Panel_racecar_racecar_2", kMiddle, kBlack, {.palindrome = kForcePalindrome}); - gen_.GeneratePairedPanels("Panel_level_level", "Panel_level_level_2", kMiddle, kBlack, {.palindrome = kForcePalindrome}); - - // The Traveled - HI - gen_.GenerateSinglePanel("Panel_hello_hi", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - - // The Discerning - gen_.GenerateSinglePanel("Panel_nope_open", kMiddle, kYellow, {.max_answer_len = 4, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_hits_this", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateDoublePanel("Panel_warred_drawer", "Panel_redraw_drawer", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_adder_dread", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_laughters_slaughter", kMiddle, kYellow, {.save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateDoublePanel("Panel_stone_notes", "Panel_onset_notes", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_rat_art", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_dusty_study", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateDoublePanel("Panel_arts_star", "Panel_tsar_star", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_state_taste", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_react_trace", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateDoublePanel("Panel_dear_read", "Panel_dare_read", kMiddle, kYellow, {.save_for_later = true, .unique_pool = "discerning"}); - gen_.GenerateSinglePanel("Panel_seam_same", kMiddle, kYellow, {.max_answer_len = 6, .save_for_later = true, .unique_pool = "discerning"}); - - // The Bold - gen_.GenerateSinglePanel("Panel_heartbreak_brake", kTop, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_airplane_plain", kTop, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_nightmare_knight", kTop, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_sign_sigh", kTop, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_unopened_open", kMiddle, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateDoublePanel("Panel_undead_dead", "Panel_deadline_dead", kMiddle, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_sushi_hi", kMiddle, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_thistle_this", kMiddle, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateDoublePanel("Panel_landmass_mass", "Panel_massacred_mass", kMiddle, kRed, {.save_for_later = true, .unique_pool = "bold"}); - gen_.GenerateDoublePanel("Panel_face_eye", "Panel_needle_eye", kBottom, kRed, {.reuse_solution = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_foot_toe", kBottom, kRed, {.reuse_solution = true, .unique_pool = "bold"}); - gen_.GenerateDoublePanel("Panel_mouth_teeth", "Panel_saw_teeth", kBottom, kRed, {.reuse_solution = true, .unique_pool = "bold"}); - gen_.GenerateSinglePanel("Panel_hand_finger", kBottom, kRed, {.reuse_solution = true, .unique_pool = "bold"}); - - // The Steady - - // The Undeterred - gen_.GenerateSinglePanel("Panel_two_toucan", kTop, kBlue, {.unique_pool = "undeterred", .reuse_solution = true, .max_len_diff = 3}); - gen_.GenerateDoublePanel("Panel_ice_eyesight", "Panel_height_eyesight", kTop, kBlue, {.unique_pool = "undeterred", .max_len_diff = 4, .reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_eye_hi", kTop, kBlue, {.unique_pool = "undeterred", .reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_pen_open", kMiddle, kBlue, {.max_answer_len = 4, .unique_pool = "undeterred"}); - gen_.GenerateSinglePanel("Panel_not_notice", kMiddle, kBlue, {.unique_pool = "undeterred", .max_len_diff = 3, .reuse_solution = true}); - gen_.GenerateDoublePanel("Panel_just_readjust", "Panel_read_readjust", kMiddle, kBlue, {.unique_pool = "undeterred", .max_len_diff = 4}); - gen_.GenerateSinglePanel("Panel_ate_primate", kMiddle, kBlue, {.unique_pool = "undeterred", .reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_bone_skeleton", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - gen_.GenerateDoublePanel("Panel_mouth_face", "Panel_eye_face", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - gen_.GenerateSinglePanel("Panel_toucan_bird", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - gen_.GenerateSinglePanel("Panel_primate_mammal", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - gen_.GenerateDoublePanel("Panel_continent_planet", "Panel_ocean_planet", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - gen_.GenerateSinglePanel("Panel_wall_room", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - - // Crossroads - gen_.GeneratePairedPanels("Panel_sword_words", "Panel_words_sword", kMiddle, kYellow); - gen_.GeneratePairedPanels("Panel_turn_runt", "Panel_turn_runt2", kMiddle, kYellow); - // Panel_runt3: runt? return! - gen_.GenerateSinglePanel("Panel_corner", kTop, kYellow, {.multiword = true}); - gen_.GenerateSinglePanel("Panel_order_chaos", kBottom, kBlack, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_swap_wasp", kMiddle, kYellow); - gen_.GenerateCohintedPanels("Panel_lost_lots", "Panel_lost_slot", kMiddle, kYellow); - gen_.GenerateSinglePanel("Panel_gel", kTop, kYellow); - gen_.GenerateSinglePanel("Panel_though", kTop, kYellow); - gen_.GenerateSinglePanel("Panel_eyes_see_shuffle", kMiddle, kYellow, {.multiword = true}); - gen_.GenerateSinglePanel("Panel_theeyes_theeyes", kMiddle, kWhite, {.multiword = true, .obscure_hint = true, .max_answer_len = 20}); - gen_.GenerateDoublePanel("Panel_amen_mean", "Panel_name_mean", kMiddle, kYellow); - gen_.GenerateSinglePanel("Panel_behind", kMiddle, kYellow, {.multiword = true}); - gen_.GenerateSinglePanel("Panel_crossroads_crossroads", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20}); - gen_.GenerateSinglePanel("Panel_corner_corner", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20}); - gen_.GenerateSinglePanel("Panel_hollow_hollow", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20}); - gen_.GeneratePairedPanels("Panel_far_far", "Panel_near_near", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20}); - gen_.GenerateSinglePanel("Panel_lost_found", kBottom, kBlack, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_clockwise_counterclockwise", kBottom, kBlack, {.max_answer_len = 20}); - - // Panel_past_present: past? present! - // Panel_future_present: future? present! - // Panel_future_past: future? past! - // Panel_past_future: past? future! - // Panel_past_past: past? past! - // Panel_pinecone_pine: pinecone? pine! - // Panel_acorn_oak: acorn? oak! - - gen_.GeneratePairedPanels("Panel_left_left", "Panel_right_right", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20, .copy_to = "Panel_left_left_2", .copy_to2 = "Panel_right_right_2"}); - gen_.GenerateSinglePanel("Panel_middle_middle", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20, .copy_to = "Panel_middle_middle_2"}); - gen_.GenerateSinglePanel("Panel_shortcuts", kMiddle, kYellow, {.multiword = true}); - gen_.GenerateSinglePanel("Panel_tower", kMiddle, kYellow, {.multiword = true}); - - // The Perceptive - gen_.GenerateSinglePanel("Panel_trace_trace", kMiddle, kWhite, {.obscure_hint = true}); - // Panel_path_lock: path? lock! - // Panel_path_knot: path? knot! - // Panel_path_lost: path? lost! - gen_.GenerateSinglePanel("Panel_look_look", kBottom, kWhite, {.max_answer_len = 7}); - // Panel_path_open: path? open! - // Panel_path_help: path? help! - // Panel_path_hunt: path? hunt! - // Panel_path_nest: path? nest! - // Panel_path_look: path? look! - gen_.GenerateSinglePanel("Panel_down_up", kBottom, kBlack, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_strays_maze", kTop, kPurple, {.reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_daze_maze", kMiddle, kPurple, {.max_answer_len = 6, .reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_reflow_flower", kMiddle, kYellow); - gen_.GenerateSinglePanel("Panel_leap_jump", kBottom, kWhite, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_hide_seek", kBottom, kBlack, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_hide_seek_2", kBottom, kBlack, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_hide_seek_3", kBottom, kBlack, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_hide_seek_4", kBottom, kBlack, {.max_answer_len = 7}); - - // The Observant - - // Knight/Night - // there are some .allow_top_expansion = true panels that don't do anything yet - // and some paired top/middle stacks that aren't implemented bc honestly who caressss - gen_.GenerateSinglePanel("Panel_rat_tar", kMiddle, kBlack, {.palindrome = kRejectPalindrome}); - gen_.GenerateSinglePanel("Panel_discover_recover", kMiddle, kPurple, {.max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_deadend_deadened", kTop, kWhite, {.multiword = true}); - gen_.GenerateSinglePanel("Panel_deadend_deadend", kMiddle, kWhite, {.multiword = true, .obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_warner_corner", kTop, kPurple); - gen_.GenerateSinglePanel("Panel_lies_lies", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20}); - gen_.GeneratePairedPanels("Panel_night_knight", "Panel_knight_night", kMiddle, kBlue); - gen_.GenerateSinglePanel("Panel_bee_be", kMiddle, kRed, {.allow_top_expansion = true}); - gen_.GenerateSinglePanel("Panel_new_knew", kMiddle, kBlue, {.max_answer_len = 4, .allow_top_expansion = true}); - gen_.GenerateSinglePanel("Panel_fore_for", kMiddle, kRed, {.allow_top_expansion = true}); - gen_.GenerateCohintedPanels("Panel_trusted_trust", "Panel_trusted_rusted", kMiddle, kRed, {.save_for_later = true}); - gen_.GenerateCohintedPanels("Panel_rust_trust", "Panel_rust_crust", kMiddle, kBlue, {.max_answer_len = 5, .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_encrusted_rust", kMiddle, kRed, {.save_for_later = true}); - gen_.GenerateCohintedPanels("Panel_adjust_readjust", "Panel_adjust_adjusted", kMiddle, kBlue, {.max_answer_len = 6, .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_adjust_readjusted", kMiddle, kBlue, {.save_for_later = true, .max_len_diff = 2}); - gen_.GeneratePairedPanels("Panel_before_fore", "Panel_be_before", kMiddle, kRed, {.obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_trust_crust", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 0}); - gen_.GenerateSinglePanel("Panel_trust_crust_2", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 0}); - gen_.GenerateSinglePanel("Panel_trusted_readjusted", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 1}); - - // The Traveled - gen_.GenerateSinglePanel("Panel_open_open", kMiddle, kWhite, {.obscure_hint = true, .unique_pool = "traveled", .save_for_later = true}); - gen_.GenerateSinglePanel("Panel_close_near", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateDoublePanel("Panel_compose_write", "Panel_record_write", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_category_type", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateDoublePanel("Panel_duplicate_same", "Panel_identical_same", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_distant_far", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_hay_straw", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateDoublePanel("Panel_giggle_laugh", "Panel_chuckle_laugh", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_snitch_rat", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_concealed_hidden", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateDoublePanel("Panel_plunge_fall", "Panel_autumn_fall", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_growths_warts", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - - // The Initiated - gen_.GenerateSinglePanel("Panel_locked_knocked", kMiddle, kPurple, {.max_answer_len = 5, .reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_daughter_laughter", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1}); - gen_.GenerateDoublePanel("Panel_move_love", "Panel_stove_love", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_scope_type", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1, .allow_top_expansion = true}); - gen_.GenerateSinglePanel("Panel_abyss_this", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1}); - gen_.GenerateDoublePanel("Panel_sweat_great", "Panel_beat_great", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_alumni_hi", kTop, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .allow_top_expansion = true}); - gen_.GenerateSinglePanel("Panel_wrath_path", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1, .allow_top_expansion = true}); - gen_.GenerateDoublePanel("Panel_knight_write", "Panel_byte_write", kTop, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 2}); - gen_.GenerateSinglePanel("Panel_maim_same", kTop, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 0}); - gen_.GenerateSinglePanel("Panel_bare_bear", kTop, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 0}); - gen_.GeneratePanelStack("Panel_chair_bear", kPurple, "", {}, "Panel_cost_most", kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_bed_dead", kMiddle, kPurple, {.reuse_solution = true, .unique_pool = "initiated", .max_len_diff = 2}); - - // The Bearer - gen_.GenerateCrossTower( - "Panel_north_missing", "Panel_diamonds_missing", "Panel_fire_missing", "Panel_winter_missing", - "Panel_north_north", "Panel_diamonds_diamonds", "Panel_fire_fire", "Panel_winter_winter", - "Panel_mouth_south", "Panel_yeast_east", "Panel_wet_west", - "Panel_spades_spades", "Panel_clubs_clubs", "Panel_hearts_hearts", - "Panel_earth_earth", "Panel_water_water", "Panel_water_water", - "Panel_summer_summer", "Panel_autumn_autumn", "Panel_spring_spring"); - gen_.GenerateSinglePanel("Panel_shortcut_shortcut", kMiddle, kWhite, {.obscure_hint = true, .max_answer_len = 20}); - // Panel_part_rap: part? rap! - // Panel_heart_tar: heart? tar! - // Panel_smile_lime: smile? lime! - // Panel_snow_won: snow? won! - // Panel_warts_star: warts? star! - // Panel_pots_top: pots? top! - // Panel_silent_list: silent? list! - // Panel_silent_list_2: silent? list! - // Panel_tent_net: tent? net! - // Panel_peace_ape: peace? ape! - // Panel_space_cape: space? cape! - // Panel_bowl_low: bowl? low! - - // Wanderlust - gen_.GenerateOrangeNumberPanel("Panel_lust"); - gen_.GenerateOrangeNumberPanel("Panel_read"); - gen_.GenerateOrangeNumberPanel("Panel_sew"); - gen_.GenerateOrangeNumberPanel("Panel_dead"); - gen_.GenerateOrangeNumberPanel("Panel_1234567890_wanderlust"); - gen_.GenerateOrangeNumberPanel("Panel_834283054_undaunted"); - gen_.GenerateOrangeWordPanel("Panel_learn"); - gen_.GenerateOrangeWordPanel("Panel_dust"); - gen_.GenerateOrangeWordPanel("Panel_star"); - gen_.GenerateOrangeWordPanel("Panel_wander"); - gen_.GenerateOrangeWordPanel("Panel_wanderlust_1234567890"); - gen_.GenerateOrangeAdditionPanel("Panel_dads_ale_dead_1"); - gen_.GenerateOrangeAdditionPanel("Panel_art_art_eat_2"); - gen_.GenerateOrangeAdditionPanel("Panel_deer_wren_rats_3"); - gen_.GenerateOrangeAdditionPanel("Panel_learns_unsew_unrest_4"); - gen_.GenerateOrangeAdditionPanel("Panel_drawl_runs_enter_5"); - gen_.GenerateOrangeAdditionPanel("Panel_reads_rust_lawns_6"); - gen_.GenerateOrangeAdditionPanel("Panel_waded_wee_warts_7"); - - // The Wise - // Panel_kitten_cat: kitten? cat! - // Panel_cat_kitten: cat? kitten! - // Panel_puppy_dog: puppy? dog! - // Panel_adult_child: adult? child! - // Panel_bread_mold: bread? mold! - // Panel_dinosaur_fossil: dinosaur? fossil! - // Panel_oak_acorn: oak? acorn! - // Panel_corpse_skeleton: corpse? skeleton! - // Panel_before_ere: before? ere! - // Panel_your_thy: your? thy! - // Panel_betwixt_between: betwixt? between! - // Panel_nigh_near: nigh? near! - // Panel_connexion_connection: connexion? connection! - // Panel_thou_you: thou? you! - - // Art Gallery - gen_.GenerateSinglePanel("Panel_eon_one", kMiddle, kYellow, {.max_answer_len = 5}); - gen_.GenerateSinglePanel("Panel_to_two", kMiddle, kRed); - gen_.GenerateSinglePanel("Panel_free_three", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_our_four", kMiddle, kBlue, {.reuse_solution = true, .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_house_neighborhood", kBottom, kBlue, {.reuse_solution = true}); - gen_.GenerateStaticPanel("Panel_path_road", "path", "road"); // can't randomise brown yet - gen_.GenerateSinglePanel("Panel_park_drive", kBottom, kBlack, {.reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_carriage_horse", kBottom, kRed, {.reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_an_many", kMiddle, kBlue, {.max_answer_len = 4}); - gen_.GenerateSinglePanel("Panel_may_many", kMiddle, kBlue, {.max_answer_len = 4}); - gen_.GenerateSinglePanel("Panel_any_many", kMiddle, kBlue, {.max_answer_len = 4}); - gen_.GenerateSinglePanel("Panel_man_many", kMiddle, kBlue, {.max_answer_len = 4}); - gen_.GenerateSinglePanel("Panel_urns_turns", kMiddle, kBlue, {.max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_learns_turns", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 0}); - gen_.GenerateSinglePanel("Panel_runts_turns", kMiddle, kYellow); - gen_.GenerateOrangeAdditionPanel("Panel_send_use_turns"); - gen_.GenerateOrangeWordPanel("Panel_trust_06890"); - gen_.GenerateOrangeNumberPanel("Panel_06890_trust"); - gen_.GenerateOneRoadManyTurns("Panel_order_onepathmanyturns", "Panel_eon_one", "Panel_path_road", "Panel_any_many", "Panel_send_use_turns"); - - // Rhyme Rooms - gen_.GeneratePanelStack("Panel_ascend_rhyme", kPurple, "", {}, "Panel_ascend_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_double_rhyme", kPurple, "", {}, "Panel_double_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_blocked_rhyme", kPurple, "", {}, "Panel_blocked_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_rise_rhyme", kPurple, "", {}, "Panel_rise_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_crystal_rhyme", kPurple, "", {}, "Panel_crystal_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_creative_rhyme", kPurple, "", {}, "Panel_creative_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_child_rhyme", kPurple, "", {}, "Panel_child_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_hidden_rhyme", kPurple, "", {}, "Panel_hidden_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_word_rhyme", kPurple, "", {}, "Panel_word_whole", kBlue, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_silent_rhyme", kPurple, "", {}, "Panel_silent_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_bones_rhyme", kPurple, "", {}, "Panel_bones_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_sentence_rhyme", kPurple, "", {}, "Panel_sentence_whole", kBlue, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_dream_rhyme", kPurple, "", {}, "Panel_dream_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_mystery_rhyme", kPurple, "", {}, "Panel_mystery_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_jump_rhyme", kPurple, "", {}, "Panel_jump_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - gen_.GeneratePanelStack("Panel_fall_rhyme", kPurple, "", {}, "Panel_fall_syn", kWhite, {.unique_pool = "rhyme", .allow_top_expansion = true}); - //gen_.GeneratePanelStack("Panel_return_rhyme", kPurple, "", {}, "Panel_return_ant", kBlack, {.unique_pool = "rhyme", .allow_top_expansion = true}); - //gen_.GeneratePanelStack("Panel_descend_rhyme", kPurple, "", {}, "Panel_descend_ant", kBlack, {.unique_pool = "rhyme", .allow_top_expansion = true}); - // ^ commenting those out for now because they take disproportionately long to generate currently - gen_.GenerateSinglePanel("Panel_leap_leap", kMiddle, kWhite, {.obscure_hint = true}); - - // The Optimistic - gen_.GenerateSinglePanel("Panel_backside_1", kMiddle, kWhite, {.obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_backside_2", kMiddle, kWhite, {.obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_backside_3", kMiddle, kWhite, {.obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_backside_4", kMiddle, kWhite, {.obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_backside_5", kMiddle, kWhite, {.obscure_hint = true}); - gen_.GenerateSinglePanel("Panel_farther_far", kMiddle, kRed); - // Panel_first_first: first? first! - // Panel_second_second: second? second! - // Panel_third_third: third? third! - // Panel_fourth_fourth: fourth? fourth! - - // Number Hunt - gen_.GenerateSinglePanel("Panel_zero_zero", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 10}); - gen_.GenerateSinglePanel("Panel_one_one", kMiddle, kWhite, {.exact_len = 1}); - gen_.GenerateSinglePanel("Panel_two_two", kMiddle, kWhite, {.exact_len = 2}); - gen_.GenerateSinglePanel("Panel_two_two_2", kMiddle, kWhite, {.exact_len = 2}); - gen_.GenerateSinglePanel("Panel_three_three", kMiddle, kWhite, {.exact_len = 3}); - gen_.GenerateSinglePanel("Panel_three_three_2", kMiddle, kWhite, {.exact_len = 3}); - gen_.GenerateSinglePanel("Panel_three_three_3", kMiddle, kWhite, {.exact_len = 3}); - gen_.GenerateSinglePanel("Panel_four_four", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 4}); - gen_.GenerateSinglePanel("Panel_four_four_2", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 4}); - gen_.GenerateSinglePanel("Panel_four_four_3", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 4}); - gen_.GenerateSinglePanel("Panel_four_four_4", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 4}); - gen_.GenerateSinglePanel("Panel_five_five", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 5}); - gen_.GenerateSinglePanel("Panel_five_five_2", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 5}); - gen_.GenerateSinglePanel("Panel_five_five_3", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 5}); - gen_.GenerateSinglePanel("Panel_five_five_4", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 5}); - gen_.GenerateSinglePanel("Panel_five_five_5", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 5}); - gen_.GenerateSinglePanel("Panel_six_six", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 6}); - gen_.GenerateSinglePanel("Panel_six_six_2", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 6}); - gen_.GenerateSinglePanel("Panel_six_six_3", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 6}); - gen_.GenerateSinglePanel("Panel_six_six_4", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 6}); - gen_.GenerateSinglePanel("Panel_six_six_5", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 6}); - gen_.GenerateSinglePanel("Panel_six_six_6", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 6}); - gen_.GenerateSinglePanel("Panel_seven_seven", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_seven_seven_2", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_seven_seven_3", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_seven_seven_4", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_seven_seven_5", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_seven_seven_6", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_seven_seven_7", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 7}); - gen_.GenerateSinglePanel("Panel_eight_eight", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_2", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_3", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_4", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_5", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_6", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_7", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_eight_eight_8", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 8}); - gen_.GenerateSinglePanel("Panel_nine_nine", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_2", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_3", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_4", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_5", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_6", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_7", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_8", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - gen_.GenerateSinglePanel("Panel_nine_nine_9", kMiddle, kWhite, {.obscure_hint = true, .exact_len = 9}); - - // Directional Gallery - gen_.GenerateStaticPanel("Panel_paranoid_paranoid", "welcome back"); - gen_.GeneratePairedPanels("Panel_salt_pepper", "Panel_pepper_salt", kBottom, kBlack); - gen_.GenerateSinglePanel("Panel_ward_forward", kMiddle, kBlue, {.reuse_solution = true, .max_len_diff = 3}); - gen_.GenerateSinglePanel("Panel_hind_behind", kMiddle, kBlue, {.reuse_solution = true, .max_len_diff = 2}); - gen_.GenerateSinglePanel("Panel_rig_right", kMiddle, kBlue, {.reuse_solution = true, .max_len_diff = 2}); - gen_.GenerateSinglePanel("Panel_windward_forward", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_light_right", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 0}); - gen_.GenerateSinglePanel("Panel_rewind_behind", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 0}); - gen_.GenerateSinglePanel("Panel_learn_return", kMiddle, kPurple, {.reuse_solution = true, .max_len_diff = 1}); - gen_.GenerateSinglePanel("Panel_turn_return", kMiddle, kBlue, {.reuse_solution = true, .max_len_diff = 2}); - - - - // Room Room - gen_.GeneratePaintingPuzzle("Panel_painting_flower", "flower_painting_gray"); - gen_.GeneratePaintingPuzzle("Panel_painting_eye", "eye_painting_gray"); - gen_.GeneratePaintingPuzzle("Panel_painting_snowman", "snowman_painting_gray"); - gen_.GeneratePaintingPuzzle("Panel_painting_owl", "owl_painting_gray"); - gen_.GeneratePaintingPuzzle("Panel_painting_panda", "panda_painting_gray"); - - - - - // The Colorful - gen_.GenerateSinglePanel("Panel_begin_start", kBottom, kWhite, {.reuse_solution = true, .unique_pool = "traveled"}); - gen_.GenerateSinglePanel("Panel_found_lost", kBottom, kBlack, {.reuse_solution = true, .unique_pool = "agreeable"}); - gen_.GenerateSinglePanel("Panel_loaf_crust", kBottom, kRed, {.reuse_solution = true, .unique_pool = "bold"}); - //Panel_eggs_breakfast: cream? butter! - gen_.GenerateSinglePanel("Panel_sun_sky", kBottom, kBlue, {.reuse_solution = true, .unique_pool = "undeterred"}); - //Panel_teacher_substitute: spoon? fork! - //Panel_walnuts_orange: letters? numbers! - //Panel_path_i: walls? green! - //Panel_iron_rust: iron? rust! - //Panel_obstacle_door: obstacle? door! - - // Champion's Rest - gen_.GenerateSinglePanel("Panel_hues_colors", kBottom, kWhite, {.max_answer_len = 6}); - gen_.GenerateSinglePanel("Panel_red_near", kMiddle, kWhite, {.copy_hidden = "Panel_red_afar"}); - gen_.GenerateSinglePanel("Panel_blue_near", kMiddle, kWhite, {.copy_hidden = "Panel_blue_afar"}); - gen_.GenerateSinglePanel("Panel_yellow_near", kMiddle, kWhite, {.copy_hidden = "Panel_yellow_afar"}); - gen_.GenerateSinglePanel("Panel_purple_near", kMiddle, kWhite, {.copy_hidden = "Panel_purple_afar"}); - gen_.GenerateSinglePanel("Panel_orange_near", kMiddle, kWhite, {.copy_hidden = "Panel_orange_afar"}); - gen_.GenerateSinglePanel("Panel_green_near", kMiddle, kWhite, {.copy_hidden = "Panel_green_afar"}); - //Panel_you: you? jeff! - gen_.GenerateStaticPanel("Panel_me", "me", "hatkirby"); - //Panel_secret_blue: blue? blue! - //Panel_secret_yellow: yellow? yellow! - //Panel_secret_red: red? red! - - // The Fearless - gen_.GenerateSinglePanel("Panel_naps_span", kMiddle, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_funny_enough", kTop, kBlack, {.unique_pool = "fearless"}); - //Panel_easy_soft: easy? soft! - //Panel_sometimes_always: sometimes? always! - //Panel_dark_extinguish: dark? heavy! - //Panel_impatient_doctor: impatient? doctor! - //Panel_even_ordinary: even? ordinary! - //Panel_one_none: sum? none! - //Panel_one_many: none? sum! - gen_.GenerateSinglePanel("Panel_team_meet", kTop, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_teem_meat", kTop, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_eat_tea", kTop, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_came_make", kTop, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_same_mace", kTop, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_safe_face", kTop, kBlack, {.unique_pool = "fearless"}); - gen_.GenerateSinglePanel("Panel_might_time", kTop, kBlack, {.unique_pool = "fearless"}); - - // The Scientific - - - - // Challenge - gen_.GenerateSinglePanel("Panel_challenge_challenge", kMiddle, kWhite, {.unique_pool = "challenge", .obscure_hint = true, .max_answer_len = 20}); - gen_.GenerateSinglePanel("Panel_welcome_welcome", kMiddle, kWhite, {.unique_pool = "challenge", .obscure_hint = true, .max_answer_len = 20}); - //Panel_open_nepotism: open? nepotism! - gen_.GenerateSinglePanel("Panel_singed_singsong", kMiddle, kPurple, {.unique_pool = "challenge", .reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_nevertrusted_maladjusted", kMiddle, kPurple, {.unique_pool = "challenge", .reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_corner_corn", kMiddle, kRed, {.unique_pool = "challenge"}); - //Panel_strawberries_mold: strawberries? mold! - //Panel_grub_burger: grub? burger! - //Panel_bread_mold: cheese? mold! - //Panel_color_gray: color? gray! - gen_.GenerateSinglePanel("Panel_writer_songwriter", kMiddle, kBlue, {.unique_pool = "challenge", .reuse_solution = true}); - //Panel_tales_stale: 02759? stale! - gen_.GenerateSinglePanel("Panel_realeyes_realize", kTop, kWhite, {.unique_pool = "challenge", .multiword = true, .max_answer_len = 20}); - gen_.GenerateSinglePanel("Panel_lobs_lobster", kMiddle, kBlue, {.unique_pool = "challenge", .max_len_diff = 4}); - gen_.GenerateSinglePanel("Panel_double_anagram_1", kMiddle, kYellow, {.unique_pool = "challenge", .force_two_words = true}); - gen_.GenerateSinglePanel("Panel_double_anagram_2", kMiddle, kYellow, {.unique_pool = "challenge", .force_two_words = true}); - gen_.GenerateSinglePanel("Panel_double_anagram_3", kMiddle, kYellow, {.unique_pool = "challenge", .force_two_words = true}); - gen_.GenerateSinglePanel("Panel_double_anagram_4", kMiddle, kYellow, {.unique_pool = "challenge", .force_two_words = true}); - gen_.GenerateSinglePanel("Panel_double_anagram_5", kMiddle, kYellow, {.unique_pool = "challenge", .force_two_words = true}); - gen_.GenerateSinglePanel("Panel_double_anagram_6", kMiddle, kYellow, {.unique_pool = "challenge", .force_two_words = true}); - //Panel_facts: facts? car! - //Panel_facts2: facts? acts! - //Panel_facts3: acts? axe! - //Panel_facts4: acts? axle! - //Panel_facts5: acts? axles! - //Panel_facts6: acts? car! - - - - - - - // The Ecstatic - gen_.GenerateSinglePanel("Panel_soundgram_1", kTop, kYellow); - gen_.GenerateSinglePanel("Panel_soundgram_2", kTop, kYellow); - // Panel_scrambled_1: eggs? scrambled eggs! - // Panel_scrambled_2: vegetables? salad! - gen_.GenerateSinglePanel("Panel_anagram_6_1", kMiddle, kYellow, {.exact_len = 6}); - gen_.GenerateSinglePanel("Panel_anagram_6_2", kMiddle, kYellow, {.exact_len = 6}); - gen_.GenerateSinglePanel("Panel_anagram_7_1", kMiddle, kYellow, {.exact_len = 7}); - gen_.GenerateSinglePanel("Panel_anagram_7_2", kMiddle, kYellow, {.exact_len = 7}); - gen_.GenerateSinglePanel("Panel_anagram_7_3", kMiddle, kYellow, {.exact_len = 7}); - gen_.GenerateSinglePanel("Panel_anagram_7_4", kMiddle, kYellow, {.exact_len = 7}); - gen_.GenerateSinglePanel("Panel_anagram_8_1", kMiddle, kYellow, {.exact_len = 8}); - gen_.GenerateSinglePanel("Panel_anagram_8_2", kMiddle, kYellow, {.exact_len = 8}); - gen_.GenerateSinglePanel("Panel_anagram_8_3", kMiddle, kYellow, {.exact_len = 8}); - gen_.GenerateSinglePanel("Panel_anagram_9_1", kMiddle, kYellow, {.exact_len = 9}); - - // The Red - gen_.GenerateSinglePanel("Panel_red_top_1", kTop, kRed); - gen_.GenerateSinglePanel("Panel_red_top_2", kTop, kRed); - gen_.GenerateSinglePanel("Panel_red_top_3", kTop, kRed); - gen_.GenerateSinglePanel("Panel_red_top_4", kTop, kRed); - //gen_.GeneratePanelStack("Panel_red_top_5", kRed, "Panel_red_mid_2", kRed, "", {}, .allow_top_expansion = true); // slow - gen_.GenerateSinglePanel("Panel_red_mid_1", kMiddle, kRed); - gen_.GenerateSinglePanel("Panel_red_mid_3", kMiddle, kRed); - gen_.GeneratePanelStack("", {}, "Panel_red_mid_4", kRed, "Panel_red_bot_4", kRed); - gen_.GeneratePanelStack("", {}, "Panel_red_mid_5", kRed, "Panel_red_bot_5", kRed); - gen_.GenerateSinglePanel("Panel_red_bot_1", kBottom, kRed, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_red_bot_2", kBottom, kRed, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_red_bot_3", kBottom, kRed, {.max_answer_len = 7}); - gen_.GenerateSinglePanel("Panel_red_bot_6", kBottom, kRed, {.max_answer_len = 7}); - - // The Artistic - gen_.GeneratePanelStack("Panel_blue_top_1", kBlue, "", {}, "Panel_red_bot_1", kRed); - gen_.GeneratePanelStack("", {}, "Panel_red_mid_22", kRed, "Panel_blue_bot_2", kBlue); - gen_.GeneratePanelStack("", {}, "Panel_blue_mid_3", kBlue, "Panel_red_bot_3", kRed); - gen_.GeneratePanelStack("Panel_red_top_4", kRed, "Panel_blue_mid_4", kBlue, "", {}); - gen_.GeneratePanelStack("Panel_yellow_top_5", kYellow, "", {}, "Panel_blue_bot_5", kBlue); - gen_.GeneratePanelStack("Panel_blue_top_6", kBlue, "Panel_yellow_mid_6", kYellow, "", {}); - // gen_.GeneratePanelStack("", {}, "Panel_blue_mid_7", kBlue, "Panel_yellow_bot_7", kYellow); - gen_.GeneratePanelStack("", {}, "Panel_yellow_mid_8", kYellow, "Panel_black_bot_8", kBlack); - // gen_.GeneratePanelStack("Panel_black_top_9", kBlack, "", {}, "Panel_yellow_bot_9", kYellow); - //gen_.GeneratePanelStack("Panel_yellow_top_10", kYellow, "", {}, "Panel_black_bot_10", kBlack); // slow - gen_.GeneratePanelStack("Panel_black_top_11", kBlack, "Panel_yellow_mid_11", kYellow, "", {}); - gen_.GeneratePanelStack("Panel_black_top_12", kBlack, "", {}, "Panel_red_bot_12", kRed); - //gen_.GeneratePanelStack("Panel_red_top_13", kRed, "", {}, "Panel_black_bot_13", kBlack); // slow - gen_.GeneratePanelStack("", {}, "Panel_black_mid_14", kBlack, "Panel_red_bot_14", kRed); - gen_.GeneratePanelStack("Panel_black_top_15", kBlack, "Panel_red_mid_15", kRed, "", {}); - gen_.GenerateSinglePanel("Panel_answer_1", kBottom, kRed); - gen_.GenerateSinglePanel("Panel_answer_2", kTop, kBlack); - gen_.GenerateSinglePanel("Panel_answer_3", kMiddle, kBlue, {.max_answer_len = 4}); - gen_.GenerateSinglePanel("Panel_answer_4", kTop, kYellow); - gen_.GenerateOneRoadManyTurns("Panel_artistic_artistic", "Panel_answer_1", "Panel_answer_2", "Panel_answer_3", "Panel_answer_4"); - - - - - - - - - - - - - // Pilgrim Room - // gen_.GenerateSinglePanel("Panel_pilgrim", kMiddle, kBlue, {.reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_shortcut", kMiddle, kYellow, {.multiword = true, .max_answer_len = 20}); - gen_.GenerateComboPanel("Panel_lingo_12", kMiddle, kPurple, kMiddle, kRed); - gen_.GenerateSinglePanel("Panel_lingo_1", kMiddle, kPurple, {.reuse_solution = true}); - gen_.GenerateSinglePanel("Panel_lingo_8", kMiddle, kBlack); - // Panel_lingo_7: 906234? strand room! - // Panel_lingo_13: floss paths? crossroads! - gen_.GenerateComboPanel("Panel_lingo_4", kBottom, kWhite, kMiddle, kPurple); - gen_.GenerateComboPanel("Panel_lingo_6", kBottom, kBlack, kBottom, kWhite); - gen_.GenerateSinglePanel("Panel_lingo_3", kBottom, kWhite); - gen_.GenerateComboPanel("Panel_lingo_10", kMiddle, kBlue, kMiddle, kRed); - gen_.GenerateSinglePanel("Panel_lingo_2", kBottom, kWhite); - gen_.GenerateSinglePanel("Panel_lingo_5", kMiddle, kYellow, {.multiword = true, .max_answer_len = 20}); - gen_.GenerateSinglePanel("Panel_lingo_11", kMiddle, kYellow, {.multiword = true, .max_answer_len = 20}); - // Panel_lingo_9: this? pilgrim room! - - std::ifstream level1("../babe.tscn"); - std::ofstream output("newlevel.tscn"); - std::string line; - std::string name; - std::string question; - std::string answer; - std::map resource_id_by_path; - int last_id = 0; - bool need_to_output_resources = false; - while (std::getline(level1, line)) { - if (line.substr(0, 18) == "[node name=\"Panel_") { - std::string stripstart = line.substr(12); - name = stripstart.substr(0, stripstart.find("\"")); - - if (gen_.IsPanelRandomized(name)) { - std::tie(question, answer) = gen_.GetPanel(name); - } else { - name = ""; - } - } - - if (line.empty()) { - name = ""; - } - - if (!name.empty() && line.substr(0, 7) == "text = ") { - std::string stripstart = line.substr(8); - output << "text = \"" << question << "\"" << std::endl; - //question = stripstart.substr(0, stripstart.find("\"")); - } else if (!name.empty() && line.substr(0, 9) == "answer = ") { - std::string stripstart = line.substr(10); - //std::string answer = stripstart.substr(0, stripstart.find("\"")); - - //std::cout << name << ": " << question << "? " << answer << "!" << std::endl; - output << "answer = \"" << answer << "\"" << std::endl; - } else if (line.substr(0, 9) == "[gd_scene") { - std::string stripstart = line.substr(21); - std::string numstr = stripstart.substr(0, stripstart.find(" ")); - int load_steps = std::atoi(numstr.c_str()); - output << "[gd_scene load_steps=" << (load_steps + gen_.GetResources().size()) << " format=2]\n"; - } else if (line.substr(0, 13) == "[ext_resource") { - std::string stripstart = line.substr(line.find("id=") + 3); - std::string numstr = stripstart.substr(0, stripstart.find("]")); - last_id = std::atoi(numstr.c_str()); - need_to_output_resources = true; - output << line << "\n"; - } else if (line.substr(0, 12) == "[node name=\"") { - std::string stripstart = line.substr(12); - std::string tempname = stripstart.substr(0, stripstart.find("\"")); - - if (gen_.IsNodeRandomized(tempname)) { - int id_pos = line.find("(") + 2; - auto [path, res_id] = gen_.GetNode(tempname); - if (res_id != 0) { - output << line.substr(0, id_pos) + std::to_string(res_id) + " )]\n"; - } else { - output << line.substr(0, id_pos) + std::to_string(resource_id_by_path[path]) + " )]\n"; - } - } else { - output << line << "\n"; - } - } else if (line.empty() && need_to_output_resources) { - for (const auto& [path, type] : gen_.GetResources()) { - last_id++; - resource_id_by_path[path] = last_id; - output << "[ext_resource path=\"" << path << "\" type=\"" << type << "\" id=" << last_id << "]\n"; - } - output << "\n"; - need_to_output_resources = false; - } else { - output << line << "\n"; - } - } - } - -private: - - unsigned int seed_; - Generator gen_; -}; - -int main(int argc, char** argv) { - std::random_device randomDevice; - unsigned int seed = randomDevice() % 1000000; - - Randomizer randomizer(seed); - randomizer.Run(); - - return 0; -} diff --git a/paintings.txt b/paintings.txt deleted file mode 100644 index f91a808..0000000 --- a/paintings.txt +++ /dev/null @@ -1,29 +0,0 @@ -beach,beach,0 -bg_bg4,clouds,0 -bg_bookshelf,bookshelf,0 -bg_candle,candle,0 -bg_egg,egg,0 -bg_fish,fish,0 -bg_halloween_2,pumpkin,0 -bg_knight,knight,0 -bg_scorpion,scorpion,0 -bg_thanksgiving,turkey,0 -catlike,cat,0 -crown,crown,0 -emmy,nest,0 -ether,rocket ship,0 -hatkirby,shooting star,0 -icy,parrot,0 -ig_note,note,0 -ig_rose,rose,0 -kiwi,kiwi,0 -ninjonicx_square,spiral,0 -rainbow,rainbow,0 -rever,fishbowl,0 -tree,tree,0 -yinyang,yinyang,0 -eight,eight,59 -north,north,44 -east,east,48 -south,south,47 -west,west,46 \ No newline at end of file diff --git a/vendor/verbly b/vendor/verbly deleted file mode 160000 index 1accf04..0000000 --- a/vendor/verbly +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1accf04179e3f1389d3d75c072ef922daac01873 -- cgit 1.4.1