getter for user played words
This commit is contained in:
parent
20db1bdcce
commit
316e212ab4
@ -44,6 +44,10 @@ std::array<std::string, g_NUM_ROLLED_CUBES> rollSides() {
|
||||
Boggle::Boggle()
|
||||
: m_showingSides(rollSides()), m_englishWords(Boggle::s_DICTIONARY_FILE) {}
|
||||
|
||||
const std::vector<string> &Boggle::playedWords() const{
|
||||
return m_playedWords;
|
||||
}
|
||||
|
||||
bool Boggle::isWordEnglish(const std::string &word) const {
|
||||
return m_englishWords.contains(word);
|
||||
}
|
||||
|
@ -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<std::string> &playedWords() const;
|
||||
bool isWordEnglish(const std::string &word) const;
|
||||
bool isWordLongEnough(const std::string &word) const;
|
||||
bool isWordPlayed(const std::string &word) const;
|
||||
|
Loading…
Reference in New Issue
Block a user