From 8c311162beb090bf09f8d0bc220646ed8697690a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 15 Feb 2023 14:38:52 +0000 Subject: Mid yellow multi-words should not just rearrange the words --- lingo.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lingo.cpp') diff --git a/lingo.cpp b/lingo.cpp index a3da33a..b461ad8 100644 --- a/lingo.cpp +++ b/lingo.cpp @@ -465,6 +465,16 @@ private: } } } + } else if (height == kMiddle && colour == kYellow) { + if (clue.getComplexity() == solution.getComplexity()) { + auto clueWords = hatkirby::split>(clue.getText(), " "); + auto solutionWords = hatkirby::split>(solution.getText(), " "); + std::sort(clueWords.begin(), clueWords.end()); + std::sort(solutionWords.begin(), solutionWords.end()); + if (clueWords == solutionWords) { + return true; + } + } } return false; } -- cgit 1.4.1