From 647378e3dc68889f1f201d9a5e3d003351869b7a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 14 Dec 2022 00:54:43 +0000 Subject: Green clues need to be paired with another clue --- lingo.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lingo.cpp') diff --git a/lingo.cpp b/lingo.cpp index 7fa0374..39e0f3e 100644 --- a/lingo.cpp +++ b/lingo.cpp @@ -509,6 +509,7 @@ private: { int hints = 0; int non_purple_uses = 0; + int non_green_uses = 0; int expensive_uses = 0; int moderate_uses = 0; int green_uses = 0; @@ -526,6 +527,10 @@ private: { non_purple_uses++; } + if (colour != kGreen) + { + non_green_uses++; + } if (expensive_hints.count(combo)) { expensive_uses++; @@ -553,9 +558,9 @@ private: } std::cout << std::endl; - if (non_purple_uses < 1) + if (non_purple_uses < 1 || non_green_uses < 1) { - std::cout << "No hints (or only purple hints)." << std::endl; + std::cout << "No hints (or only purple or only green hints)." << std::endl; continue; } if (expensive_uses > 1) -- cgit 1.4.1