-
Notifications
You must be signed in to change notification settings - Fork 0
/
Map.h
60 lines (46 loc) · 1.31 KB
/
Map.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 MAP_H
#define MAP_H
#include <fstream>
#include <iostream>
#include <ctype.h>
using namespace std;
class Map
{
private:
static const int num_rows = 5;
static const int num_cols = 9;
static const int num_npcs = 3;
static const int num_hackers = 3;
int playerPosition[2];
int bestBuyPosition[2];
int npcPositions[num_npcs][2];
int hackerPositions[num_hackers][2];
char mapData[num_rows][num_cols];
int npc_count;
int hacker_count;
bool best_buy_on_map;
public :
Map();
void resetMap();
// getters
int getPlayerRowPosition();
int getPlayerColPosition();
int getNPCCount();
int getHackerCount();
// setters
void setPlayerRowPosition(int);
void setPlayerColPosition(int);
void setNPCCount(int);
void setHackerCount(int);
bool spawnNPC(int, int);
bool spawnBestBuy(int, int);
bool spawnHacker(int, int);
void displayMap();
void displayMoves();
bool executeMove(char);
bool isBestBuyLocation();
bool isNPCLocation();
bool isHackerLocation();
bool isBestBuyOnMap();
};
#endif