From 782172c4a78d2608a925a488aedfb56a9a426f87 Mon Sep 17 00:00:00 2001 From: synth-ruiner Date: Wed, 18 Mar 2015 18:41:17 +0000 Subject: [PATCH] Clear saved game if game is over --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 96ea052..518becf 100644 --- a/index.html +++ b/index.html @@ -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() {