12 #include "../lib/toolkit.h" 13 #include "../lib/dependencies.h" 36 virtual bool start() = 0;
58 char squares[3][3] = {{
' ',
' ',
' '}, {
' ',
' ',
' '}, {
' ',
' ',
' '}};
72 char getSquare(
int row,
int col)
const;
79 void playerMove(
int row,
int col);
96 bool start()
override;
98 bool handlePlayerTurn();
100 bool getPlayerMove(
int &row,
int &col);
102 bool isValidMove(
int row,
int col);
104 void makeMove(
int row,
int col,
char symbol);
106 bool isGameOver(
int moveCount);
108 bool processComputerTurn();
110 void setBoard(
char newBoard[3][3]);
129 std::vector<std::string> words;
130 std::vector<std::string> guesses;
138 static int generateRandomIndex(
size_t size);
151 bool start()
override;
173 int getWordLength()
const;
179 int getGuessCount()
const;
185 std::string getLastGuess()
const;
202 std::vector<int> cards;
204 std::vector<int> playersCards;
229 int evaluate(
bool hit);
235 void displayState(
bool printAll);
241 const int *getDealer()
const;
247 void setDealer(
const int newDealer[2]);
253 const std::vector<int> &getPlayerCards()
const;
259 void setPlayerCards(
const std::vector<int> &newPlayerCards);
265 bool start()
override;
277 int initializeGame();
283 bool handlePlayerTurn();
289 void updateGameState(
bool won,
int rounds,
int totalWins,
int maxRounds,
bool wasHit);
296 bool endGame(
bool won);
299 #endif // MINIGAMES_H Implements the BlackJack mini-game.
Definition: minigames.h:199
virtual std::string getGameName()=0
Gets the name of the game.
Implements the CodeGuesser mini-game.
Definition: minigames.h:126
Abstract base class for mini-games.
Definition: minigames.h:28
virtual bool start()=0
Starts the game.
virtual ~Game()
Virtual destructor for proper cleanup of derived classes.
Definition: minigames.h:41
Implements the TicTacToe mini-game.
Definition: minigames.h:55