MiniGame-Madness
|
Class representing the Battleship game. More...
#include <BattleshipGame.h>
Public Member Functions | |
BattleshipGame () | |
Default constructor. Initializes the game with its own ScreenBuffer. | |
BattleshipGame (ScreenBuffer *buffer) | |
Constructor that accepts an external ScreenBuffer. More... | |
BattleshipGame (const BattleshipGame &other) | |
Copy Constructor. | |
BattleshipGame & | operator= (const BattleshipGame &other) |
Copy Assignment Operator. | |
~BattleshipGame () | |
Destructor to clean up resources. | |
void | run (std::function< std::string()> inputProvider=nullptr) |
Main function to run the Battleship game. More... | |
Public Attributes | |
Player | player |
The human player. | |
Player | ai |
The AI opponent. | |
Class representing the Battleship game.
BattleshipGame::BattleshipGame | ( | ScreenBuffer * | buffer | ) |
Constructor that accepts an external ScreenBuffer.
buffer | Pointer to an externally provided ScreenBuffer. |
void BattleshipGame::run | ( | std::function< std::string()> | inputProvider = nullptr | ) |
Main function to run the Battleship game.
inputProvider | Function to provide input for testing purposes. |