summary refs log tree commit diff stats
path: root/lingo.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-02-15 14:38:52 +0000
committerStar Rauchenberger <fefferburbia@gmail.com>2023-02-15 14:38:52 +0000
commit8c311162beb090bf09f8d0bc220646ed8697690a (patch)
tree4cf72a874eeec86308c96b5f8ebb493f132615e7 /lingo.cpp
parent1fec3be2bb57418fb6bb846c06e804b77c3695a8 (diff)
downloadlingo-8c311162beb090bf09f8d0bc220646ed8697690a.tar.gz
lingo-8c311162beb090bf09f8d0bc220646ed8697690a.tar.bz2
lingo-8c311162beb090bf09f8d0bc220646ed8697690a.zip
Mid yellow multi-words should not just rearrange the words
Diffstat (limited to 'lingo.cpp')
-rw-r--r--lingo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lingo.cpp b/lingo.cpp index a3da33a..b461ad8 100644 --- a/lingo.cpp +++ b/lingo.cpp
@@ -465,6 +465,16 @@ private:
465 } 465 }
466 } 466 }
467 } 467 }
468 } else if (height == kMiddle && colour == kYellow) {
469 if (clue.getComplexity() == solution.getComplexity()) {
470 auto clueWords = hatkirby::split<std::vector<std::string>>(clue.getText(), " ");
471 auto solutionWords = hatkirby::split<std::vector<std::string>>(solution.getText(), " ");
472 std::sort(clueWords.begin(), clueWords.end());
473 std::sort(solutionWords.begin(), solutionWords.end());
474 if (clueWords == solutionWords) {
475 return true;
476 }
477 }
468 } 478 }
469 return false; 479 return false;
470 } 480 }