-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.h
59 lines (36 loc) · 1.02 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
59
//
// Created by iDarkDuck on 2018-10-19.
//
#ifndef CPP_PROJECT_MEMORY_GAME_PLAYER_H
#define CPP_PROJECT_MEMORY_GAME_PLAYER_H
#include <vector>
#include <cassert>
#include "rewarddeck.h"
enum class Side {
Top, Bottom, Left, Right
};
class Player {
public:
explicit Player(const string &);
string getName() const;
void setActive(const bool &);
bool isActive() const;
int getNRubies() const;
void addReward(const Reward &);
void setDisplayMode(const bool &);
Side getSide() const;
void setSide(const Side &);
friend ostream &operator<<(ostream &, const Player &);
friend bool operator<(const Player &, const Player &);
friend bool operator>(const Player &, const Player &);
friend bool operator==(const Player &, const Player &);
friend bool operator!=(const Player &, const Player &);
private:
string name;
bool active;
bool endOfGame;
int nRubies;
Side side;
string getSideToString() const;
};
#endif //CPP_PROJECT_MEMORY_GAME_PLAYER_H