===================================================================
--- original.js
+++ change.js
@@ -92,8 +92,13 @@
bubbles[l].destroy();
bubbles.splice(l, 1);
score += 20;
scoreTxt.setText('Score: ' + score);
+ // Winning condition: If the player score is bigger than 5,000,000,00
+ if (score >= 5000000000) {
+ // Show "you win". The game will be automatically paused while you win is showing.
+ LK.showYouWin(); // Calling this will set a win for the player, destroy the 'Game' and reset entire game state.
+ }
break;
}
}
}