diff options
| -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 | } |
