diff --git a/src/game.cpp b/src/game.cpp index c8c7567..23d3376 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -325,7 +325,9 @@ bool Game::checkLastPillEaten() { void Game::checkScoreForExtraLife() { int lastScore = currentScore; currentScore = Labyrinth::getInstance()->getScore(); - if ((lastScore<10000 && currentScore>=10000) || (lastScore<30000 && currentScore>=30000)) { + int target = ( ( currentScore / 10000 ) * 10000 ) ; + + if (lastScore=target){ Pacman::getInstance()->addLives(1); Sounds::getInstance()->playSingleSound(Sounds::EXTRA_MAN); }