diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-12-14 00:54:43 +0000 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-12-14 00:54:43 +0000 |
commit | 647378e3dc68889f1f201d9a5e3d003351869b7a (patch) | |
tree | 781a0a3e2914294340d429ba368558a4b4ed4db9 /lingo.cpp | |
parent | e2835e2726ec6059373174f9cfaa4824165e59ec (diff) | |
download | lingo-647378e3dc68889f1f201d9a5e3d003351869b7a.tar.gz lingo-647378e3dc68889f1f201d9a5e3d003351869b7a.tar.bz2 lingo-647378e3dc68889f1f201d9a5e3d003351869b7a.zip |
Green clues need to be paired with another clue
Diffstat (limited to 'lingo.cpp')
-rw-r--r-- | lingo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lingo.cpp b/lingo.cpp index 7fa0374..39e0f3e 100644 --- a/lingo.cpp +++ b/lingo.cpp | |||
@@ -509,6 +509,7 @@ private: | |||
509 | { | 509 | { |
510 | int hints = 0; | 510 | int hints = 0; |
511 | int non_purple_uses = 0; | 511 | int non_purple_uses = 0; |
512 | int non_green_uses = 0; | ||
512 | int expensive_uses = 0; | 513 | int expensive_uses = 0; |
513 | int moderate_uses = 0; | 514 | int moderate_uses = 0; |
514 | int green_uses = 0; | 515 | int green_uses = 0; |
@@ -526,6 +527,10 @@ private: | |||
526 | { | 527 | { |
527 | non_purple_uses++; | 528 | non_purple_uses++; |
528 | } | 529 | } |
530 | if (colour != kGreen) | ||
531 | { | ||
532 | non_green_uses++; | ||
533 | } | ||
529 | if (expensive_hints.count(combo)) | 534 | if (expensive_hints.count(combo)) |
530 | { | 535 | { |
531 | expensive_uses++; | 536 | expensive_uses++; |
@@ -553,9 +558,9 @@ private: | |||
553 | } | 558 | } |
554 | std::cout << std::endl; | 559 | std::cout << std::endl; |
555 | 560 | ||
556 | if (non_purple_uses < 1) | 561 | if (non_purple_uses < 1 || non_green_uses < 1) |
557 | { | 562 | { |
558 | std::cout << "No hints (or only purple hints)." << std::endl; | 563 | std::cout << "No hints (or only purple or only green hints)." << std::endl; |
559 | continue; | 564 | continue; |
560 | } | 565 | } |
561 | if (expensive_uses > 1) | 566 | if (expensive_uses > 1) |