-
Notifications
You must be signed in to change notification settings - Fork 2
/
GameLogicManager.h
45 lines (39 loc) · 991 Bytes
/
GameLogicManager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <memory>
#include "Bot.h"
#include "Board.h"
#include "Shop.h"
#include "CLI.h"
class GameLogicManager
{
private:
// Manage which player is playing
bool m_player1Turn = true;
std::unique_ptr<Player> m_player1;
std::unique_ptr<Bot> m_bot;
std::shared_ptr<Board> m_board;
std::unique_ptr<Shop> m_shop;
std::unique_ptr<CLI> m_cli;
// Number of turns
size_t m_turn = 3;
public:
GameLogicManager()
{
srand( time( NULL ) );
createPlayers();
createBoard();
createShop();
createCLI();
}
void createPlayers();
void createBoard();
void createShop();
void createCLI();
Board &getBoard() const { return *m_board; }
Shop &getShop() const { return *m_shop; }
Player &getPlayer1() const { return *m_player1; }
Player &getPlayer2() const { return *m_bot; }
//void startGame();
CLI::cli_input recruitementPhase();
CLI::cli_input battlePhase();
void endPhase();
};