added startup menu
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
GameBoard::GameBoard(int boardWidth, int boardHeight, const std::shared_ptr<PiecesList>& piecesList, int nextQueueLength) :
|
GameBoard::GameBoard(int boardWidth, int boardHeight, const std::shared_ptr<PiecesList>& piecesList, int nextQueueLength) :
|
||||||
|
|||||||
@@ -120,8 +120,6 @@ void GamePlayingAppMenu::drawFrame() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// end coutdown
|
|
||||||
|
|
||||||
if (drawActivePiece) {
|
if (drawActivePiece) {
|
||||||
// ghost piece
|
// ghost piece
|
||||||
sf::Color ghostColor = this->getColorOfBlock(this->game.getActivePiece()->getBlockType(), 100);
|
sf::Color ghostColor = this->getColorOfBlock(this->game.getActivePiece()->getBlockType(), 100);
|
||||||
|
|||||||
74
src/GraphicalUI/AppMenus/StartUpAppMenu.cpp
Normal file
74
src/GraphicalUI/AppMenus/StartUpAppMenu.cpp
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
#include "StartUpAppMenu.h"
|
||||||
|
|
||||||
|
#include "AppMenu.h"
|
||||||
|
#include "MainAppMenu.h"
|
||||||
|
#include "../PlayerCursor.h"
|
||||||
|
|
||||||
|
#include <stack>
|
||||||
|
#include <memory>
|
||||||
|
#include <SFML/Graphics.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
StartUpAppMenu::StartUpAppMenu(std::shared_ptr<MenuStack> menuStack, std::shared_ptr<Settings> settings, std::shared_ptr<sf::RenderWindow> renderWindow) :
|
||||||
|
AppMenu(menuStack, settings, renderWindow),
|
||||||
|
playerCursor({LOADED_PIECES_SIZE + 1}) {
|
||||||
|
|
||||||
|
this->playerCursor.goToPosition({MINIMUM_PIECES_SIZE, 0});
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartUpAppMenu::computeFrame() {
|
||||||
|
this->updateMetaBinds();
|
||||||
|
this->playerCursor.updatePosition();
|
||||||
|
|
||||||
|
if (this->playerCursor.getPosition().x < MINIMUM_PIECES_SIZE) {
|
||||||
|
if (this->playerCursor.movedLeft()) {
|
||||||
|
this->playerCursor.goToPosition({LOADED_PIECES_SIZE, 0});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->playerCursor.goToPosition({MINIMUM_PIECES_SIZE, 0});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->enterReleased) {
|
||||||
|
*this->settings = Settings(this->playerCursor.getPosition().x);
|
||||||
|
this->menuStack->pop();
|
||||||
|
|
||||||
|
if (this->settings->hasLoadedPieces()) {
|
||||||
|
this->menuStack->push(std::make_shared<MainAppMenu>(this->menuStack, this->settings, this->renderWindow));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
std::cout << "ERROR: COULD NOT LOAD PIECES" << std::endl;
|
||||||
|
std::cout << "ARGUMENT WAS: " << this->playerCursor.getPosition().x << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this->escReleased) {
|
||||||
|
this->menuStack->pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void StartUpAppMenu::drawFrame() const {
|
||||||
|
this->renderWindow->clear(sf::Color(200, 200, 200));
|
||||||
|
|
||||||
|
sf::Text text(this->pressStartFont, "", this->settings->getWindowSizeMultiplier() * 2);
|
||||||
|
text.setFillColor(sf::Color(0, 0, 0));
|
||||||
|
text.setOutlineColor(sf::Color(255, 255, 255));
|
||||||
|
|
||||||
|
this->placeTitle(text, {}, "SELECT MAXIMUM PIECES SIZE", 10.f, {});
|
||||||
|
this->placeTitle(text, this->playerCursor, "< " + std::to_string(this->playerCursor.getPosition().x) + " >", 25.f, this->playerCursor.getPosition());
|
||||||
|
|
||||||
|
text.setOutlineColor({0, 0, 0});
|
||||||
|
if (this->playerCursor.getPosition().x <= 10) {
|
||||||
|
text.setFillColor({0, 255, 0});
|
||||||
|
this->placeTitle(text, {}, "LOW LOAD TIME", 40.f, {});
|
||||||
|
}
|
||||||
|
else if (this->playerCursor.getPosition().x <= 13) {
|
||||||
|
text.setFillColor({255, 255, 0});
|
||||||
|
this->placeTitle(text, {}, "MEDIUM LOAD TIME", 40.f, {});
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
text.setFillColor({255, 0, 0});
|
||||||
|
this->placeTitle(text, {}, "LONG LOAD TIME", 40.f, {});
|
||||||
|
}
|
||||||
|
|
||||||
|
this->renderWindow->display();
|
||||||
|
}
|
||||||
21
src/GraphicalUI/AppMenus/StartUpAppMenu.h
Normal file
21
src/GraphicalUI/AppMenus/StartUpAppMenu.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "AppMenu.h"
|
||||||
|
#include "../PlayerCursor.h"
|
||||||
|
|
||||||
|
#include <stack>
|
||||||
|
#include <memory>
|
||||||
|
#include <SFML/Graphics.hpp>
|
||||||
|
|
||||||
|
|
||||||
|
class StartUpAppMenu : public AppMenu {
|
||||||
|
private:
|
||||||
|
PlayerCursor playerCursor;
|
||||||
|
|
||||||
|
public:
|
||||||
|
StartUpAppMenu(std::shared_ptr<MenuStack> menuStack, std::shared_ptr<Settings> settings, std::shared_ptr<sf::RenderWindow> renderWindow);
|
||||||
|
|
||||||
|
void computeFrame() override;
|
||||||
|
|
||||||
|
void drawFrame() const override;
|
||||||
|
};
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "GraphApp.h"
|
#include "GraphApp.h"
|
||||||
|
|
||||||
#include "AppMenus/AppMenu.h"
|
#include "AppMenus/AppMenu.h"
|
||||||
#include "AppMenus/MainAppMenu.h"
|
#include "AppMenus/StartUpAppMenu.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
|
|
||||||
#include <stack>
|
#include <stack>
|
||||||
@@ -11,15 +11,15 @@
|
|||||||
static const double TIME_BETWEEN_FRAMES = (1000.f / FRAMES_PER_SECOND);
|
static const double TIME_BETWEEN_FRAMES = (1000.f / FRAMES_PER_SECOND);
|
||||||
|
|
||||||
|
|
||||||
GraphApp::GraphApp(int maximumPiecesSize) {
|
GraphApp::GraphApp() {
|
||||||
this->settings = std::make_shared<Settings>(maximumPiecesSize);
|
this->settings = std::make_shared<Settings>(0);
|
||||||
this->menuStack = std::make_shared<MenuStack>();
|
this->menuStack = std::make_shared<MenuStack>();
|
||||||
this->renderWindow = std::make_shared<sf::RenderWindow>();
|
this->renderWindow = std::make_shared<sf::RenderWindow>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphApp::run() {
|
void GraphApp::run() {
|
||||||
this->settings->changeVideoMode(*this->renderWindow);
|
this->settings->changeVideoMode(*this->renderWindow);
|
||||||
this->menuStack->push(std::make_shared<MainAppMenu>(this->menuStack, this->settings, this->renderWindow));
|
this->menuStack->push(std::make_shared<StartUpAppMenu>(this->menuStack, this->settings, this->renderWindow));
|
||||||
|
|
||||||
bool quit = false;
|
bool quit = false;
|
||||||
double timeAtNextFrame = 0;
|
double timeAtNextFrame = 0;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class GraphApp {
|
|||||||
std::shared_ptr<sf::RenderWindow> renderWindow;
|
std::shared_ptr<sf::RenderWindow> renderWindow;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GraphApp(int maximumPiecesSize);
|
GraphApp();
|
||||||
|
|
||||||
void run();
|
void run();
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
|
|
||||||
#include "../Core/Menu.h"
|
#include "../Core/Menu.h"
|
||||||
#include "Keybinds.h"
|
#include "Keybinds.h"
|
||||||
|
#include "PiecesType.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <SFML/Graphics.hpp>
|
#include <SFML/Graphics.hpp>
|
||||||
@@ -15,9 +17,26 @@ static const int DISTRIBUTION_MAX = 10;
|
|||||||
|
|
||||||
|
|
||||||
Settings::Settings(int maximumPiecesSize) {
|
Settings::Settings(int maximumPiecesSize) {
|
||||||
this->maximumPiecesSize = maximumPiecesSize;
|
if (maximumPiecesSize < MINIMUM_PIECES_SIZE || maximumPiecesSize > LOADED_PIECES_SIZE) {
|
||||||
for (int i = 1; i <= this->maximumPiecesSize; i++) {
|
this->maximumPiecesSize = 0;
|
||||||
this->menu.getPiecesList().loadPieces(i);
|
this->loadedPieces = false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bool loaded = true;
|
||||||
|
int i = 1;
|
||||||
|
while (loaded && (i <= maximumPiecesSize)) {
|
||||||
|
loaded = this->menu.getPiecesList().loadPieces(i);
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loaded) {
|
||||||
|
this->maximumPiecesSize = maximumPiecesSize;
|
||||||
|
this->loadedPieces = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->maximumPiecesSize = 0;
|
||||||
|
this->loadedPieces = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this->keybinds.reserve(NUMBER_OF_KEYBINDS);
|
this->keybinds.reserve(NUMBER_OF_KEYBINDS);
|
||||||
@@ -68,50 +87,58 @@ void Settings::loadSettingsFromFile() {
|
|||||||
settingsFile.get(byte);
|
settingsFile.get(byte);
|
||||||
this->menu.setBoardHeight(byte);
|
this->menu.setBoardHeight(byte);
|
||||||
|
|
||||||
// piece distribution
|
if (this->loadedPieces) {
|
||||||
settingsFile.get(byte);
|
// piece distribution
|
||||||
this->menu.getPiecesList().setDistributionMode(DistributionMode(byte));
|
|
||||||
|
|
||||||
this->distributions.clear();
|
|
||||||
this->distributions.push_back(0);
|
|
||||||
for (int i = 1; i <= 15; i++) {
|
|
||||||
settingsFile.get(byte);
|
settingsFile.get(byte);
|
||||||
this->distributions.push_back(byte);
|
this->menu.getPiecesList().setDistributionMode(DistributionMode(byte));
|
||||||
}
|
|
||||||
this->confirmDistribution();
|
|
||||||
|
|
||||||
// selected pieces
|
this->distributions.clear();
|
||||||
char pieceType;
|
this->distributions.push_back(0);
|
||||||
char pieceSize;
|
for (int i = 1; i <= 15; i++) {
|
||||||
char lowByte;
|
settingsFile.get(byte);
|
||||||
char midByte;
|
this->distributions.push_back(byte);
|
||||||
char highByte;
|
}
|
||||||
|
this->confirmDistribution();
|
||||||
|
|
||||||
this->selectedPieces.clear();
|
// selected pieces
|
||||||
while (settingsFile.get(pieceType)) {
|
char pieceType;
|
||||||
if (settingsFile.eof()) break;
|
char pieceSize;
|
||||||
|
char lowByte;
|
||||||
|
char midByte;
|
||||||
|
char highByte;
|
||||||
|
|
||||||
if (getSizeOfPieces(PiecesType(pieceType)) == 0) {
|
this->selectedPieces.clear();
|
||||||
settingsFile.get(pieceSize);
|
while (settingsFile.get(pieceType)) {
|
||||||
|
if (settingsFile.eof()) break;
|
||||||
|
|
||||||
if (!(pieceSize > this->maximumPiecesSize)) {
|
if (getSizeOfPieces(PiecesType(pieceType)) == 0) {
|
||||||
this->selectedPieces.emplace_back(PiecesType(pieceType), pieceSize);
|
settingsFile.get(pieceSize);
|
||||||
}
|
|
||||||
}
|
if (!(pieceSize > this->maximumPiecesSize)) {
|
||||||
else {
|
this->selectedPieces.emplace_back(PiecesType(pieceType), pieceSize);
|
||||||
if (!(getSizeOfPieces(PiecesType(pieceType)) > this->maximumPiecesSize)) {
|
}
|
||||||
settingsFile.get(lowByte);
|
}
|
||||||
settingsFile.get(midByte);
|
else {
|
||||||
settingsFile.get(highByte);
|
if (!(getSizeOfPieces(PiecesType(pieceType)) > this->maximumPiecesSize)) {
|
||||||
int pieceNumber = ((unsigned char) lowByte) + ((unsigned char) midByte << 8) + ((unsigned char) highByte << 16);
|
settingsFile.get(lowByte);
|
||||||
this->selectedPieces.emplace_back(PiecesType(pieceType), pieceNumber);
|
settingsFile.get(midByte);
|
||||||
|
settingsFile.get(highByte);
|
||||||
|
int pieceNumber = ((unsigned char) lowByte) + ((unsigned char) midByte << 8) + ((unsigned char) highByte << 16);
|
||||||
|
this->selectedPieces.emplace_back(PiecesType(pieceType), pieceNumber);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this->confirmSelectedPieces();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->distributions.clear();
|
||||||
|
this->selectedPieces.clear();
|
||||||
}
|
}
|
||||||
this->confirmSelectedPieces();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::saveSettingsToFile() const {
|
void Settings::saveSettingsToFile() const {
|
||||||
|
if (!this->loadedPieces) return;
|
||||||
|
|
||||||
this->keybinds.at(CUSTOMIZABLE_KEYBINDS).saveKeybindsToFile();
|
this->keybinds.at(CUSTOMIZABLE_KEYBINDS).saveKeybindsToFile();
|
||||||
|
|
||||||
std::ofstream settingsFile("data/config/settings.bin", std::ios::trunc | std::ios::binary);
|
std::ofstream settingsFile("data/config/settings.bin", std::ios::trunc | std::ios::binary);
|
||||||
@@ -247,16 +274,21 @@ void Settings::setGamemode(Gamemode gamemode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Settings::selectPieces(PiecesType type, int value) {
|
void Settings::selectPieces(PiecesType type, int value) {
|
||||||
|
if (!this->loadedPieces) return;
|
||||||
|
|
||||||
this->selectedPieces.emplace_back(type, value);
|
this->selectedPieces.emplace_back(type, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::unselectPieces(int index) {
|
void Settings::unselectPieces(int index) {
|
||||||
|
if (!this->loadedPieces) return;
|
||||||
if (index >= this->selectedPieces.size()) return;
|
if (index >= this->selectedPieces.size()) return;
|
||||||
|
|
||||||
this->selectedPieces.erase(this->selectedPieces.begin() + index);
|
this->selectedPieces.erase(this->selectedPieces.begin() + index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::confirmSelectedPieces() {
|
void Settings::confirmSelectedPieces() {
|
||||||
|
if (!this->loadedPieces) return;
|
||||||
|
|
||||||
this->menu.getPiecesList().unselectAll();
|
this->menu.getPiecesList().unselectAll();
|
||||||
|
|
||||||
if (this->getSelectedPieces().size() == 0) {
|
if (this->getSelectedPieces().size() == 0) {
|
||||||
@@ -281,6 +313,7 @@ void Settings::confirmSelectedPieces() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::increaseDistribution(int size) {
|
bool Settings::increaseDistribution(int size) {
|
||||||
|
if (!this->loadedPieces) return false;
|
||||||
if (size < 1 || size > this->maximumPiecesSize) return false;
|
if (size < 1 || size > this->maximumPiecesSize) return false;
|
||||||
|
|
||||||
if (this->distributions.at(size) < DISTRIBUTION_MAX) {
|
if (this->distributions.at(size) < DISTRIBUTION_MAX) {
|
||||||
@@ -291,6 +324,7 @@ bool Settings::increaseDistribution(int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Settings::decreaseDistribution(int size) {
|
bool Settings::decreaseDistribution(int size) {
|
||||||
|
if (!this->loadedPieces) return false;
|
||||||
if (size < 1 || size > this->maximumPiecesSize) return false;
|
if (size < 1 || size > this->maximumPiecesSize) return false;
|
||||||
|
|
||||||
if (this->distributions.at(size) > 0) {
|
if (this->distributions.at(size) > 0) {
|
||||||
@@ -301,6 +335,8 @@ bool Settings::decreaseDistribution(int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Settings::confirmDistribution() {
|
void Settings::confirmDistribution() {
|
||||||
|
if (!this->loadedPieces) return;
|
||||||
|
|
||||||
for (int i = 1; i <= 15; i++) {
|
for (int i = 1; i <= 15; i++) {
|
||||||
this->menu.getPiecesList().changeCustomDistribution(i, (double) 1 / (this->distributions.at(i) + 0.001));
|
this->menu.getPiecesList().changeCustomDistribution(i, (double) 1 / (this->distributions.at(i) + 0.001));
|
||||||
}
|
}
|
||||||
@@ -318,6 +354,10 @@ int Settings::getMaximumPiecesSize() const {
|
|||||||
return this->maximumPiecesSize;
|
return this->maximumPiecesSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Settings::hasLoadedPieces() const {
|
||||||
|
return this->loadedPieces;
|
||||||
|
}
|
||||||
|
|
||||||
int Settings::getKeybindsLayout() const {
|
int Settings::getKeybindsLayout() const {
|
||||||
return this->chosenKeybinds;
|
return this->chosenKeybinds;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,33 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "../Core/Menu.h"
|
#include "../Core/Menu.h"
|
||||||
#include "StartUpMenu.h"
|
|
||||||
#include "Keybinds.h"
|
#include "Keybinds.h"
|
||||||
#include "PiecesType.h"
|
#include "PiecesType.h"
|
||||||
|
|
||||||
#include <SFML/Graphics.hpp>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <SFML/Graphics.hpp>
|
||||||
|
|
||||||
static const int MAXIMUM_BOARD_WIDTH = 40;
|
static const int MAXIMUM_BOARD_WIDTH = 40;
|
||||||
static const int MAXIMUM_BOARD_HEIGHT = 40;
|
static const int MAXIMUM_BOARD_HEIGHT = 40;
|
||||||
|
|
||||||
|
static const int MINIMUM_PIECES_SIZE = 4;
|
||||||
|
static const int MAXIMUM_PIECES_SIZE = 15;
|
||||||
|
|
||||||
|
//#define __JMINOS_RELEASE__
|
||||||
|
#ifdef __JMINOS_RELEASE__
|
||||||
|
static const int LOADED_PIECES_SIZE = 15;
|
||||||
|
#else
|
||||||
|
static const int LOADED_PIECES_SIZE = 10;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static const std::pair<PiecesType, int> DEFAULT_SELECTION = {ALL_PIECES, MINIMUM_PIECES_SIZE};
|
||||||
|
|
||||||
|
|
||||||
class Settings {
|
class Settings {
|
||||||
private:
|
private:
|
||||||
Menu menu;
|
Menu menu;
|
||||||
int maximumPiecesSize;
|
int maximumPiecesSize;
|
||||||
|
bool loadedPieces;
|
||||||
std::vector<Keybinds> keybinds;
|
std::vector<Keybinds> keybinds;
|
||||||
int chosenKeybinds;
|
int chosenKeybinds;
|
||||||
int windowSizeMode;
|
int windowSizeMode;
|
||||||
@@ -67,6 +79,8 @@ class Settings {
|
|||||||
|
|
||||||
int getMaximumPiecesSize() const;
|
int getMaximumPiecesSize() const;
|
||||||
|
|
||||||
|
bool hasLoadedPieces() const;
|
||||||
|
|
||||||
int getKeybindsLayout() const;
|
int getKeybindsLayout() const;
|
||||||
|
|
||||||
Gamemode getGamemode() const;
|
Gamemode getGamemode() const;
|
||||||
|
|||||||
@@ -1,15 +0,0 @@
|
|||||||
#include "StartUpMenu.h"
|
|
||||||
|
|
||||||
#include "PlayerCursor.h"
|
|
||||||
|
|
||||||
|
|
||||||
StartUpMenu::StartUpMenu() :
|
|
||||||
playerCursor({LOADED_PIECES_SIZE}) {
|
|
||||||
|
|
||||||
this->playerCursor.goToPosition({MINIMUM_PIECES_SIZE, 0});
|
|
||||||
}
|
|
||||||
|
|
||||||
int StartUpMenu::getMaximumPiecesSize() {
|
|
||||||
return LOADED_PIECES_SIZE;
|
|
||||||
//TODO
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#include "PiecesType.h"
|
|
||||||
#include "PlayerCursor.h"
|
|
||||||
|
|
||||||
|
|
||||||
static const int MINIMUM_PIECES_SIZE = 4;
|
|
||||||
static const int MAXIMUM_PIECES_SIZE = 15;
|
|
||||||
|
|
||||||
//#define __JMINOS_RELEASE__
|
|
||||||
#ifdef __JMINOS_RELEASE__
|
|
||||||
static const int LOADED_PIECES_SIZE = 15;
|
|
||||||
#else
|
|
||||||
static const int LOADED_PIECES_SIZE = 10;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const std::pair<PiecesType, int> DEFAULT_SELECTION = {ALL_PIECES, MINIMUM_PIECES_SIZE};
|
|
||||||
|
|
||||||
|
|
||||||
class StartUpMenu {
|
|
||||||
private:
|
|
||||||
PlayerCursor playerCursor;
|
|
||||||
|
|
||||||
public:
|
|
||||||
StartUpMenu();
|
|
||||||
|
|
||||||
int getMaximumPiecesSize();
|
|
||||||
};
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
#include "StartUpMenu.h"
|
|
||||||
#include "GraphApp.h"
|
#include "GraphApp.h"
|
||||||
#include "../Pieces/PiecesFiles.h"
|
#include "../Pieces/PiecesFiles.h"
|
||||||
|
|
||||||
@@ -31,10 +30,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StartUpMenu startUp;
|
GraphApp UI;
|
||||||
int maximumPiecesSize = startUp.getMaximumPiecesSize();
|
|
||||||
|
|
||||||
GraphApp UI(maximumPiecesSize);
|
|
||||||
UI.run();
|
UI.run();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user