-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoard.h
60 lines (50 loc) · 1.45 KB
/
Board.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef BOARD_H
#define BOARD_H
#include "Player.h"
#include "Floor.h"
#include "Unit.h"
#include <memory>
#include <vector>
#include <string>
#include <utility>
class Board {
private:
static Board *instance;
Player *player;
Floor *currentFloor;
int currentFloorNum;
int const totalFloors;
bool isPaused;
std::string customFileName;
std::string currentAction;
Board();
public:
std::vector<std::vector<std::vector<char>>> customFloorLayouts;
std::vector<std::vector<char>> defaultFloorLayout;
~Board();
static Board *getInstance();
void startGame();
void startGame(const std::string &filename);
void restartGame();
void quitGame();
void setCurrentAction(const std::string &action);
std::string getCurrentAction();
void toggleFreeze();
bool getIsPaused();
void setIsPaused(bool state);
void moveToNextFloor();
Floor *getCurrentFloor();
int getCurrentFloorNum();
bool movePlayer(const std::string &direction);
bool playerAttack(const std::string &direction);
bool usePotion(const std::string &direction);
void choosePlayer(const std::string &race);
void readAllFloorLayouts(const std::string &filename);
void readDefaultFloorLayout(const std::string &filename);
void Display();
Player *getPlayer();
std::vector<std::vector<char>> getDefaultFloorLayout();
void displayAllFloorLayouts();
void applyCustomChamberLayout();
};
#endif