blob: 2a58e7578574fbc7e9968c1625438e71c7427ef9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
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 && currentScore>=target){
Pacman::getInstance()->addLives(1);
Sounds::getInstance()->playSingleSound(Sounds::EXTRA_MAN);
}
|