From 5d516b9adea62c30a861c17de10002254c4427d0 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 10 Dec 2022 13:39:22 -0500 Subject: Bottom red/blue should not return something with the same form fixes #19 --- lingo.cpp | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'lingo.cpp') diff --git a/lingo.cpp b/lingo.cpp index b903ea6..4c43d9c 100644 --- a/lingo.cpp +++ b/lingo.cpp @@ -122,9 +122,19 @@ verbly::filter makeHintFilter(verbly::filter subfilter, Height height, Colour co case kBottom: { if (filter_direction == kTowardSolution) { - return (verbly::notion::partMeronyms %= subfilter); + 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 %= subfilter); + 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. @@ -152,9 +162,19 @@ verbly::filter makeHintFilter(verbly::filter subfilter, Height height, Colour co case kBottom: { if (filter_direction == kTowardSolution) { - return (verbly::notion::partHolonyms %= subfilter); + 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 %= subfilter); + 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. -- cgit 1.4.1