-
Notifications
You must be signed in to change notification settings - Fork 0
/
Game.h
50 lines (38 loc) · 1008 Bytes
/
Game.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
#ifndef GAME_H_
#define GAME_H_
#include <fstream>
#include "Player.h"
#include "Locations.h"
#include "Utils.h"
#define GRAPH_SIZE 3
class Location;
class Game
{
public:
Game();
virtual ~Game();
/* Player info */
Player player;
Location *currLoc;
/* Debug */
void printGraph();
/* Functions */
void createNewCharacter();
void save();
void load();
std::vector<std::string> parseChoice();
/* Accessors */
inline bool getPlaying() const { return this->playing; }
inline std::string getPlayerName() const { return player.getName(); }
inline Location* graphAt(size_t i) { return this->graph[i]; }
inline const Location& getLoc() const { return *this->currLoc; }
/* Modifiers */
inline void setGraph(Location **newGraph) { this->graph = newGraph; }
void movePlayer(std::string direction);
private:
Location **graph;
int choice;
bool playing;
std::string fileName;
};
#endif // GAME_H_