Skip to content

Commit 88dbd62

Browse files
committed
Update challenge mode high score when leveling up
1 parent 8dce399 commit 88dbd62

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/states/GameStateChallenge.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ void GameStateChallenge::handleEvents(std::vector<Event> events) {
7272
if (this->level % 5 == 0 && this->required_matches < CHALLENGE_MODE_MAX_REQUIRED_MATCHES) {
7373
this->required_matches += 1;
7474
}
75+
if (this->level > this->options->getChallengeModeHighscore()) {
76+
this->options->setChallengeModeHighscore(this->level);
77+
}
7578
this->board->loadLevel(this->width, this->height, this->moves, this->required_matches, this->level, this->seed);
7679
}
7780
} else if (this->failed) {

0 commit comments

Comments
 (0)