#include "Menu.h" #include "PiecesList.h" #include "Player.h" #include "Game.h" Menu::Menu() { // default board size this->boardHeight = 20; this->boardWidth = 10; } Game Menu::startGame(Gamemode gamemode) { return Game(gamemode, this->playerControls, this->boardWidth, this->boardHeight, std::make_shared(this->piecesList)); } bool Menu::setBoardWidth(int width) { if (width < 1) return false; this->boardWidth = width; return true; } bool Menu::setBoardHeight(int height) { if (height < 1) return false; this->boardHeight = height; return true; } int Menu::getBoardWidth() { return this->boardWidth; } int Menu::getBoardHeight() { return this->boardHeight; } Player& Menu::getPlayerControls() { return this->playerControls; } PiecesList& Menu::getPiecesList() { return this->piecesList; }