summary refs log tree commit diff stats
path: root/lingo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lingo.cpp')
-rw-r--r--lingo.cpp9
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)