summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-02-15 14:36:27 +0000
committerStar Rauchenberger <fefferburbia@gmail.com>2023-02-15 14:36:27 +0000
commit1fec3be2bb57418fb6bb846c06e804b77c3695a8 (patch)
treee11fc8002ad3145a7fd375716a03508e246ed41e
parent4fd90bf77cc8d595a3d36a566d8276c59a985c31 (diff)
downloadlingo-1fec3be2bb57418fb6bb846c06e804b77c3695a8.tar.gz
lingo-1fec3be2bb57418fb6bb846c06e804b77c3695a8.tar.bz2
lingo-1fec3be2bb57418fb6bb846c06e804b77c3695a8.zip
Two word middle reds should not point to just one of those words
-rw-r--r--lingo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lingo.cpp b/lingo.cpp index 4d9b480..a3da33a 100644 --- a/lingo.cpp +++ b/lingo.cpp
@@ -456,6 +456,15 @@ private:
456 } else if (height == kTop && colour == kPurple) 456 } else if (height == kTop && colour == kPurple)
457 { 457 {
458 return clue.getId() == solution.getId(); 458 return clue.getId() == solution.getId();
459 } else if (height == kMiddle && colour == kRed) {
460 if (clue.getComplexity() == 2 && solution.getComplexity() == 1) {
461 auto words = hatkirby::split<std::vector<std::string>>(clue.getText(), " ");
462 for (const auto& word : words) {
463 if (word == solution.getText()) {
464 return true;
465 }
466 }
467 }
459 } 468 }
460 return false; 469 return false;
461 } 470 }