-
Notifications
You must be signed in to change notification settings - Fork 0
/
leaderboard.hpp
117 lines (114 loc) · 1.83 KB
/
leaderboard.hpp
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#include <string>
#include <vector>
using namespace std;
class run {
private:
string playerID;
string playerName;
int checkpoints;
int teleports;
string runTime;
int runDate;
public:
void setPlayerID(string read)
{
playerID = read;
}
string getPlayerID()
{
return playerID;
}
void setPlayerName(string read)
{
playerName = read;
}
string getPlayerName()
{
return playerName;
}
void setCheckpoints(int read)
{
checkpoints = read;
}
int getCheckpoints()
{
return checkpoints;
}
void setTeleports(int read)
{
teleports = read;
}
int getTeleports()
{
return teleports;
}
void setRunTime(string read)
{
runTime = read;
}
string getRunTime()
{
return runTime;
}
void setRunDate(int read)
{
runDate = read;
}
int getRunDate()
{
return runDate;
}
};
class player {
private:
string playerID;
string playerName;
int runCount = 0;
int recordCount = 0;
vector<string> recordMaps;
public:
void setPlayerID(string read)
{
playerID = read;
}
string getPlayerID()
{
return playerID;
}
void setPlayerName(string read)
{
playerName = read;
}
string getPlayerName()
{
return playerName;
}
int getRunCount()
{
return runCount;
}
int getRecordCount()
{
return recordCount;
}
void incRunCount()
{
runCount++;
}
void incRecordCount()
{
recordCount++;
}
void insRecMap(string fileName)
{
recordMaps.push_back(fileName);
}
int getRecMapSize()
{
return recordMaps.size();
}
string getRecMapAt(int i)
{
return recordMaps.at(i);
}
};