diff --git a/src/Boggle.cpp b/src/Boggle.cpp index d6a8532..9c7aaf0 100755 --- a/src/Boggle.cpp +++ b/src/Boggle.cpp @@ -44,6 +44,10 @@ std::array rollSides() { Boggle::Boggle() : m_showingSides(rollSides()), m_englishWords(Boggle::s_DICTIONARY_FILE) {} +const std::vector &Boggle::playedWords() const{ + return m_playedWords; +} + bool Boggle::isWordEnglish(const std::string &word) const { return m_englishWords.contains(word); } diff --git a/src/Boggle.h b/src/Boggle.h index 89709b4..0f8e45a 100755 --- a/src/Boggle.h +++ b/src/Boggle.h @@ -23,8 +23,13 @@ public: static const int s_MIN_WORD_LENGTH = 4; static const int s_BOARD_SIZE = 4; +public: Boggle(); + /** + * Getter for the users played words + */ + const std::vector &playedWords() const; bool isWordEnglish(const std::string &word) const; bool isWordLongEnough(const std::string &word) const; bool isWordPlayed(const std::string &word) const;