![]() |
OOP A3 Board Games 35
a Board Game Project Made by Students at Cairo FCAI
|
Base template for all players (human or AI). More...
#include <BoardGame_Classes.h>
Public Member Functions | |
| Player (string n, T s, PlayerType t) | |
| Construct a player with name, symbol, and type. | |
| virtual | ~Player () |
| string | get_name () const |
| Get the player's name. | |
| PlayerType | get_type () const |
| Get player type (e.g., 'H' or 'C'). | |
| T | get_symbol () const |
| Get the player's symbol. | |
| Board< T > * | get_board_ptr () const |
| Get a pointer to the game board. | |
| void | set_board_ptr (Board< T > *b) |
| Assign the board pointer for the player. | |
Protected Attributes | |
| string | name |
| Player name. | |
| PlayerType | type |
| Player type (e.g., HUMAN or COMPUTER). | |
| T | symbol |
| Player’s symbol on board. | |
| Board< T > * | boardPtr |
| Pointer to the game board. | |
Base template for all players (human or AI).
| T | Type of symbol used by the player. |
|
inline |
Construct a player with name, symbol, and type.
Get a pointer to the game board.
|
inline |
Get the player's name.
|
inline |
Get the player's symbol.
|
inline |
Get player type (e.g., 'H' or 'C').
Assign the board pointer for the player.
|
protected |
Player’s symbol on board.
|
protected |
Player type (e.g., HUMAN or COMPUTER).