From 6ce1edf606a384f0722f15ab25caad899c271280 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 17 Feb 2023 11:13:56 -0500 Subject: allow_top_expansion When this flag is unset (which is in most cases), top clues must be distinct from middle clues. also we forgot to have the common word filter lol --- generator.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'generator.h') diff --git a/generator.h b/generator.h index 1c7934e..7803004 100644 --- a/generator.h +++ b/generator.h @@ -56,6 +56,7 @@ struct GenerateOptions { 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 { @@ -197,7 +198,7 @@ public: private: - verbly::filter MakeHintFilter(verbly::filter subfilter, Height height, Colour colour, FilterDirection filter_direction); + 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); @@ -215,7 +216,7 @@ private: verbly::filter GetWordFilter(FilterDirection direction, GenerateOptions options) const; - bool IsClueTrivial(Height height, Colour colour, const verbly::form& clue, const verbly::form& solution) const; + bool IsClueTrivial(Height height, Colour colour, const verbly::form& clue, const verbly::form& solution, GenerateOptions options = {}) const; unsigned int seed_; std::mt19937 rng_; -- cgit 1.4.1