Remove unnecessary check.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 20 Sep 2014 01:01:53 +0300
changeset 96 a9a6e08c9e35
parent 95 804e751a3b7f
child 97 b3cadad6ef14
Remove unnecessary check.
2048.html
--- a/2048.html	Sat Sep 20 00:51:45 2014 +0300
+++ b/2048.html	Sat Sep 20 01:01:53 2014 +0300
@@ -617,7 +617,7 @@
       ui.game.finishStep();
       ui.score.speed(parseFloat((step*1000.0/(tsTo-tsFrom)).toPrecision(3)), step);
       ui.game.setMessage("Game over!");
-      ui.ai.current && ui.ai.current.cleanup();
+      ui.ai.current.cleanup();
     }
     document.getElementById("finish").addEventListener("click", ui.action.finish, false);
 
@@ -670,7 +670,7 @@
       var tsTo = new Date().getTime();
       ui.game.refresh();
       ui.score.speed(parseFloat((step*1000.0/(tsTo-tsFrom)).toPrecision(3)), step);
-      ui.ai.current && ui.ai.current.cleanup();
+      ui.ai.current.cleanup();
     }
     document.getElementById("until").addEventListener("click", ui.action.until, false);