From fcb1ac0269dde77cd0a69c26b819127f861bd580 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 9 Dec 2022 14:50:53 -0500 Subject: Top purple now matches the game's behaviour This also fixes middle purple, which was not working before. fixes #4 --- lingo.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lingo.cpp b/lingo.cpp index fdc4619..c6f9427 100644 --- a/lingo.cpp +++ b/lingo.cpp @@ -144,10 +144,22 @@ verbly::filter makeHintFilter(verbly::filter subfilter, Height height, Colour co case kPurple: { switch (height) { case kMiddle: { - return (verbly::form::merographs %= (verbly::form::length >= 4 && (verbly::form::holographs %= subfilter))); + 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); + return (verbly::pronunciation::holophones %= + verbly::filter("toppurp", false, + (verbly::pronunciation::numOfSyllables >= 2 && (verbly::pronunciation::merophones %= + (subfilter && verbly::filter( + verbly::pronunciation::id, + verbly::filter::comparison::field_does_not_equal, + verbly::pronunciation::id)))))); } default: break; // Not supported yet. } -- cgit 1.4.1