Untitled
unknown
plain_text
a year ago
374 B
8
Indexable
#include "Score.h"
Score::Score() : score(0), highScore(0) {}
void Score::updateScore(int points) {
score += points;
if (score > highScore) {
highScore = score;
}
}
int Score::getScore() const {
return score;
}
void Score::setHighScore(int highScore) {
this->highScore = highScore;
}
int Score::getHighScore() const {
return highScore;
}Editor is loading...
Leave a Comment