diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-02-15 14:38:52 +0000 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-02-15 14:38:52 +0000 |
commit | 8c311162beb090bf09f8d0bc220646ed8697690a (patch) | |
tree | 4cf72a874eeec86308c96b5f8ebb493f132615e7 | |
parent | 1fec3be2bb57418fb6bb846c06e804b77c3695a8 (diff) | |
download | lingo-8c311162beb090bf09f8d0bc220646ed8697690a.tar.gz lingo-8c311162beb090bf09f8d0bc220646ed8697690a.tar.bz2 lingo-8c311162beb090bf09f8d0bc220646ed8697690a.zip |
Mid yellow multi-words should not just rearrange the words
-rw-r--r-- | lingo.cpp | 10 |
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 | } |