Untitled
#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; }
Leave a Comment