-
Notifications
You must be signed in to change notification settings - Fork 0
/
racer.cpp
48 lines (38 loc) · 856 Bytes
/
racer.cpp
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 "racer.h"
Racer::Racer(int bib,
unsigned long startTime,
int startDelay, int raceMode,
QElapsedTimer *timer) {
this->bib = bib;
this->startTime = startTime;
this->startDelay = startDelay;
this->timer = timer;
this->raceMode = raceMode;
}
void Racer::start() {
this->timer->start();
}
int Racer::getBib() {
return this->bib;
}
int Racer::getStartDelay() {
return this->startDelay;
}
unsigned long Racer::getStartTime() {
return this->startTime;
}
int Racer::getTime() {
return this->startDelay + this->timer->elapsed();
}
void Racer::setFinishTime(int time) {
this->finishTime = time;
}
int Racer::getFinishTime() {
return this->finishTime;
}
int Racer::getRaceMode() {
return this->raceMode;
}
void Racer::setRaceMode(int mode) {
this->raceMode = mode;
}