Untitled

 avatar
unknown
plain_text
10 months ago
348 B
4
Indexable
#include "Score.h"

Score::Score() {
    reset();
}

void Score::reset() {
    score = 0;
    highScore = 0;
}

int Score::getScore() const {
    return score;
}

int Score::getHighScore() const {
    return highScore;
}

void Score::updateScore(int lines) {
    score += lines * 100;
    if (score > highScore) {
        highScore = score;
    }
}
Editor is loading...
Leave a Comment