-
Notifications
You must be signed in to change notification settings - Fork 7
/
player.h
58 lines (47 loc) · 1.21 KB
/
player.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
#ifndef PLAYER_H
#define PLAYER_H
//#include "money_action.h"
#include <string>
using namespace std;
struct Coordinates{
int x;
int y;
};
class Player {
private:
string playerName;
char gamePiece;
int moneyAmount;
int location;
bool indexOfProperties[40];
bool alive;
string gamePieceName;
Coordinates pixelLocation;
public:
//constructors
Player();
Player(int money);
//functions to set values
void setPlayerName(string inputName);
void setGamePiece(char inputPiece);
void setOwnedProperty(int inputIndex, bool isOwned);
void setLocation(int spaceNum);
void setGamePieceName(string inputPieceName);
void setPixelLocation(Coordinates tempLocation);
void setMoneyAmount(int inputNum);
//functions to get values
string getPlayerName();
char getGamePiece();
int getMoneyAmount();
bool getOwnedProperty(int inputIndex);
int getLocation();
bool isAlive();
string getGamePieceName();
Coordinates getPixelLocation();
//other functions
void give_money(int amount);
void take_money(int amount);
void move_player(int amount);
void reset();
};
#endif