From dad0c0c6dc5a6c04f305f71ed78ca99f85cca78c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 10 Dec 2022 15:10:31 -0500 Subject: Clues and solutions must be between 3 and 11 characters fixes #6, #9 --- lingo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lingo.cpp b/lingo.cpp index 8f972e3..c2f36af 100644 --- a/lingo.cpp +++ b/lingo.cpp @@ -427,7 +427,10 @@ private: {kMiddle, kBlue}, }; - verbly::filter wordFilter = (verbly::form::proper == false); + verbly::filter wordFilter = + (verbly::form::proper == false) && + (verbly::form::length >= 3) && + (verbly::form::length <= 11); verbly::filter cleanFilter = !(verbly::word::usageDomains %= (verbly::notion::wnid == 106718862)) // ethnic slurs @@ -500,7 +503,7 @@ private: continue; } - verbly::filter forwardFilter = cleanFilter && (verbly::form::proper == false); + verbly::filter forwardFilter = cleanFilter && wordFilter; for (int i=0; i(kHeightCount); i++) { Height height = static_cast(i); std::optional& colour = parts[i]; -- cgit 1.4.1