-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.h
More file actions
56 lines (48 loc) · 1.69 KB
/
Player.h
File metadata and controls
56 lines (48 loc) · 1.69 KB
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
#ifndef PLAYER_H
#define PLAYER_H
#include <iostream>
using namespace std;
//PLAYER CLASS IS FINISHED
class Player
{
private:
string playerName;
string playerChar;
int boardlocation;
int previousBoardLocation;
int balance;
int playerPos_x;
int playerPos_y;
int turnsinjail;
bool bankrupt;
bool resetLocation;
bool inJail;
bool displayStatus;
public:
Player();
void setResetLocation_TRUE();
void setName(string playerName_); // Set player name
void setPlayerChar(string playerChar_);
// NOTE: We can only set the balance and not update it(ADD/SUBTRACT)
void setBalance(int balance_);
void setJailStatus(bool response);
void setPlayerPos(int x, int y);
void setJailCounter(int turns);
void setDisplayStatus(bool updateStatus);
//We must only use this function when we have determined that the player is bankrupted or has decided to quit
void setBankruptStatusTrue();
void setBoardLocation(int);
bool getResetLocation_Status();
bool getJailStatus();
string getName() const; //Get player name
string getPlayerChar() const;
int getJailCounter();
int getBalance() const; //Get balance
int getBoardLocation();
int getPlayerPos_x() const;
int getPlayerPos_y() const;
bool getBankruptStatus() const; // We must use this function to check if the player can play
int getPreviousBoardLocation();
bool getDisplayStatus() const;
};
#endif