My Project
GameState Class Reference

#include <game.hpp>

Classes

struct  guess
 

Public Types

enum  matchType { NO_MATCH , MATCH , EXACT_MATCH }
 
typedef std::array< matchType, WORD_LENGTHguessResultT
 

Public Member Functions

 GameState ()
 
 GameState (const std::string &word)
 
void setWord (const std::string &)
 
std::string getWord ()
 
uint8_t getTries ()
 
std::vector< std::string > getGuesses ()
 
guessResultT guess (const std::string &)
 
std::string serialize (bool)
 
void operator= (wordle_de::GameState)
 

Private Attributes

std::string word
 
uint8_t tries
 
std::vector< std::string > guesses
 

Member Typedef Documentation

◆ guessResultT

Member Enumeration Documentation

◆ matchType

Enumerator
NO_MATCH 
MATCH 
EXACT_MATCH 

Constructor & Destructor Documentation

◆ GameState() [1/2]

GameState::GameState ( )

◆ GameState() [2/2]

GameState::GameState ( const std::string &  word)

Member Function Documentation

◆ getGuesses()

std::vector< std::string > GameState::getGuesses ( )
inline
Here is the caller graph for this function:

◆ getTries()

uint8_t GameState::getTries ( )
inline
Here is the caller graph for this function:

◆ getWord()

std::string GameState::getWord ( )
inline
Here is the caller graph for this function:

◆ guess()

std::array< GameState::matchType, WORD_LENGTH > GameState::guess ( const std::string &  guessedWord)
Here is the caller graph for this function:

◆ operator=()

void GameState::operator= ( wordle_de::GameState  state)

◆ serialize()

std::string GameState::serialize ( bool  newWord)
Here is the caller graph for this function:

◆ setWord()

void GameState::setWord ( const std::string &  w)
Here is the caller graph for this function:

Member Data Documentation

◆ guesses

std::vector<std::string> GameState::guesses
private

◆ tries

uint8_t GameState::tries
private

◆ word

std::string GameState::word
private

The documentation for this class was generated from the following files: