-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard.h
53 lines (40 loc) · 1.17 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
#ifndef _BOARD_H
#define _BOARD_H
#include <map>
#include <vector>
#include <string>
#include <memory>
#include <vector>
#include "boardDisplay.h"
#include "positionMap.h"
using std::shared_ptr;
using std::string;
using std::map;
using std::vector;
class BoardDisplay;
class Board {
// i.e. "MC": 1, "DC": 0, "AL": -1
map<string, int> sqrImproves;
// i.e. "A": 34, "G": 2
map<char, int> playerPos;
//vector<shared_ptr<Square>> squares;
//vector<shared_ptr<Player>> players;
std::unique_ptr<BoardDisplay> bd = nullptr;
// called in drawBoard to update BoardDisplay
void updateInfo();
public:
Board();
void drawBoard();
// main calls this to add a player to Board's playerPos vector
void addPlayer( char player );
// removes player if they go bankrupt
void removePlayer( char gamepiece );
// updates display with player's new position and modifies
// player's posX, posY fields acccordingly
void movePlayer( char gamepiece, int newSqr );
// udpates display with added improvement
void addImpr( string building );
void removeImpr( string building );
int getImpr( string building );
};
#endif