-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGameUser.cpp
More file actions
48 lines (45 loc) · 1020 Bytes
/
Copy pathGameUser.cpp
File metadata and controls
48 lines (45 loc) · 1020 Bytes
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
#include "GameUser.h"
GameUser::GameUser(std::string name, int points, int total, std::string difficulty, bool base) :
name(name), points(points), total(total), difficulty(difficulty), fromBase(base) {}
std::string GameUser::getName()
{
return this->name;
}
int GameUser::getPoints()
{
return this->points;
}
std::string GameUser::getDifficulty()
{
return this->difficulty;
}
void GameUser::addPoints(int points)
{
this->points += points;
}
void GameUser::removePoints(int points)
{
this->points -= points;
}
void GameUser::setPoints(int points)
{
this->points = points;
}
void GameUser::setDifficulty(std::string difficulty) {
this->difficulty = difficulty;
}
bool GameUser::getFromBase() {
return this->fromBase;
}
void GameUser::setFromBase(bool base) {
this->fromBase = base;
}
int GameUser::getTotalPoints() {
return this->total + this->points;
}
int GameUser::getTotal() {
return this->total;
}
void GameUser::setTotal(int total) {
this->total = total;
}