|
My Project
UML Lab
|
Class representing a player in the game. More...
#include <player.h>
Public Types | |
| enum class | PlayerType { Human , Computer } |
| Enumeration representing the type of player. More... | |
Public Member Functions | |
| Player (const sf::Color color) | |
| Constructor for Player class with default type as Human. | |
| Player (sf::Color color, PlayerType type) | |
| Constructor for Player class. | |
| sf::Color | getColor () const |
| Getter function for the color of the player. | |
Public Attributes | |
| PlayerType | type |
Private Attributes | |
| sf::Color | color |
Friends | |
| class | Board |
Class representing a player in the game.
|
strong |
| Player::Player | ( | const sf::Color | color | ) |
Constructor for Player class with default type as Human.
| color | The color of the player. |
| Player::Player | ( | sf::Color | color, |
| PlayerType | type ) |
Constructor for Player class.
| color | The color of the player. |
| type | The type of the player. |
|
inline |
Getter function for the color of the player.
|
friend |
|
private |
The color of the player. The type of the player.
| PlayerType Player::type |