34 lines
613 B
C++
34 lines
613 B
C++
#include "../Player/Player.hpp"
|
|
|
|
/**
|
|
* Creates a new player with a specific name.
|
|
* @param name The name of the player.
|
|
*/
|
|
Player::Player(std::string name) {
|
|
this->_name = name;
|
|
}
|
|
|
|
/**
|
|
* Gets the color of the player.
|
|
* @return The color of the player.
|
|
*/
|
|
ChessPieceColor Player::GetColor() {
|
|
return this->_color;
|
|
}
|
|
|
|
/**
|
|
* Gets the name of the player.
|
|
* @return The name of the player.
|
|
*/
|
|
std::string Player::GetName() {
|
|
return this->_name;
|
|
}
|
|
|
|
/**
|
|
* Sets the color of the player.
|
|
* @param color The color of the player.
|
|
*/
|
|
void Player::SetColor(ChessPieceColor color) {
|
|
this->_color = color;
|
|
}
|