17 srand(
static_cast<unsigned int>(time(0)));
22 }
while (board_matrix[x][y] !=
' ');
23 cout <<
"\nComputer played at (" << x <<
"," << y <<
")\n";
39 <<
" player: " << name <<
" (" << symbol <<
")\n";
PlayerType
Represents the type of player in the game.
Definition BoardGame_Classes.h:24
@ HUMAN
A human player.
Definition BoardGame_Classes.h:25
@ COMPUTER
A computer-controlled player.
Definition BoardGame_Classes.h:26
Represents a single move in a board game.
Definition BoardGame_Classes.h:100
Base template for all players (human or AI).
Definition BoardGame_Classes.h:126
PlayerType get_type() const
Get player type (e.g., 'H' or 'C').
Definition BoardGame_Classes.h:147
Board< T > * get_board_ptr() const
Get a pointer to the game board.
Definition BoardGame_Classes.h:153
string get_name() const
Get the player's name.
Definition BoardGame_Classes.h:144
T get_symbol() const
Get the player's symbol.
Definition BoardGame_Classes.h:150
SUSUI()
Definition SUSUI.h:11
Player< char > * create_player(string &name, char symbol, PlayerType type) override
Create a player object based on input name, symbol, and type.
Definition SUSUI.h:37
Move< char > * get_move(Player< char > *p) override
Ask the user (or AI) to make a move.
Definition SUSUI.h:12
void display_message(string s)
Definition SUSUI.h:43
UI(string message, int cell_display_width)
Definition BoardGame_Classes.h:196