Clear saved game if game is over

This commit is contained in:
synth-ruiner 2015-03-18 18:41:17 +00:00
parent c36f714946
commit 782172c4a7
1 changed files with 4 additions and 1 deletions

View File

@ -484,6 +484,9 @@
function checkGameOver() {
if (isGameOver()) {
$('#gameOver').show();
//clear saved game
localStorage.clear();
}
}
@ -790,11 +793,11 @@
removeClearedRows();
removeClearedColumns();
saveGame();
checkGameOver();
updateScore();
updateMinesLeft();
saveGame();
});
$(window).resize(function() {