refactoring

This commit is contained in:
2025-03-24 22:39:16 +01:00
parent 321271b748
commit c168cd68d7
18 changed files with 256 additions and 115 deletions

View File

@@ -47,6 +47,14 @@ Player& Menu::getPlayerControls() {
return this->playerControls;
}
const Player& Menu::readPlayerControls() const {
return this->playerControls;
}
PiecesList& Menu::getPiecesList() {
return *this->piecesList;
}
const PiecesList& Menu::readPiecesList() const {
return *this->piecesList;
}

View File

@@ -50,14 +50,24 @@ class Menu {
* @return The height of the board
*/
int getBoardHeight() const;
/**
* @return A reference to the player's controls
*/
Player& getPlayerControls();
/**
* @return A reference to the player's controls
*/
const Player& readPlayerControls() const;
/**
* @return A reference to the pieces list
*/
PiecesList& getPiecesList();
/**
* @return A reference to the pieces list
*/
const PiecesList& readPiecesList() const;
};