From 038e3d624951bdbb9a91c2bfb3aeb29a0ae51eb1 Mon Sep 17 00:00:00 2001 From: Fabrice Ecaille Date: Thu, 17 Oct 2013 18:13:29 +0200 Subject: [PATCH] Bugfix: right score/wave_score/bonus --- js/spaceinvaders-core.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/spaceinvaders-core.js b/js/spaceinvaders-core.js index aa3d65f..fc354d3 100644 --- a/js/spaceinvaders-core.js +++ b/js/spaceinvaders-core.js @@ -58,12 +58,13 @@ Game = { levelComplete : function() { "use strict"; Game.running = false; - var bonus = Math.round(((Game.shots.total - Game.shots.lost) / Game.shots.total) * Game.wave.score); + var bonus = Math.round(((Game.shots.total - Game.shots.lost) / Game.shots.total) * Game.wave.score), + wave_score = Game.wave.score; Game.addToScore(bonus); displayModal( { bonus: bonus, - wave_score: Game.wave.score, + wave_score: wave_score, score: Game.score, });