From c4d05ba579f36e1c708330f5317e42c62bc4146b Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Mon, 18 Nov 2024 21:47:58 +0100 Subject: [PATCH] Increase amount of matches needed only every 5 levels for challenge mode --- src/states/GameStateChallenge.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/states/GameStateChallenge.cpp b/src/states/GameStateChallenge.cpp index 7caf7b5..c4adbcf 100644 --- a/src/states/GameStateChallenge.cpp +++ b/src/states/GameStateChallenge.cpp @@ -72,7 +72,12 @@ void GameStateChallenge::handleEvents(std::vector events) { if (event == Event::CONFIRM) { this->completed = false; this->theme.next(); - this->board->loadLevel(this->position.x, this->position.y, this->width, this->height, this->moves, ++this->required_matches, ++this->level, ++this->seed); + this->level += 1; + this->seed += 1; + if (this->level % 5 == 0) { + this->required_matches += 1; + } + this->board->loadLevel(this->position.x, this->position.y, this->width, this->height, this->moves, this->required_matches, this->level, this->seed); } } else if (this->failed) { if (event == Event::CONFIRM) { @@ -141,7 +146,7 @@ void GameStateChallenge::loadLevel() { this->moves = 10; this->level = this->options->getChallengeModeLevel(); - this->required_matches = 11 + this->level; + this->required_matches = 11 + (this->level / 5); this->seed = this->level;