summary refs log tree commit diff stats
path: root/lingo.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-12-10 15:10:31 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2022-12-10 15:10:31 -0500
commitdad0c0c6dc5a6c04f305f71ed78ca99f85cca78c (patch)
treef063965f4a87bc0dc39c44f1a552e944ab74a144 /lingo.cpp
parente611a2ccf16d690a80334f9ba231eab6bb6b6f27 (diff)
downloadlingo-dad0c0c6dc5a6c04f305f71ed78ca99f85cca78c.tar.gz
lingo-dad0c0c6dc5a6c04f305f71ed78ca99f85cca78c.tar.bz2
lingo-dad0c0c6dc5a6c04f305f71ed78ca99f85cca78c.zip
Clues and solutions must be between 3 and 11 characters
fixes #6, #9
Diffstat (limited to 'lingo.cpp')
-rw-r--r--lingo.cpp7
1 files 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:
427 {kMiddle, kBlue}, 427 {kMiddle, kBlue},
428 }; 428 };
429 429
430 verbly::filter wordFilter = (verbly::form::proper == false); 430 verbly::filter wordFilter =
431 (verbly::form::proper == false) &&
432 (verbly::form::length >= 3) &&
433 (verbly::form::length <= 11);
431 434
432 verbly::filter cleanFilter = 435 verbly::filter cleanFilter =
433 !(verbly::word::usageDomains %= (verbly::notion::wnid == 106718862)) // ethnic slurs 436 !(verbly::word::usageDomains %= (verbly::notion::wnid == 106718862)) // ethnic slurs
@@ -500,7 +503,7 @@ private:
500 continue; 503 continue;
501 } 504 }
502 505
503 verbly::filter forwardFilter = cleanFilter && (verbly::form::proper == false); 506 verbly::filter forwardFilter = cleanFilter && wordFilter;
504 for (int i=0; i<static_cast<int>(kHeightCount); i++) { 507 for (int i=0; i<static_cast<int>(kHeightCount); i++) {
505 Height height = static_cast<Height>(i); 508 Height height = static_cast<Height>(i);
506 std::optional<Colour>& colour = parts[i]; 509 std::optional<Colour>& colour = parts[i];