changeset 189:44cb6fbad74d

Another function rename.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sun, 07 Aug 2016 23:24:28 +0300
parents 754796e567ab
children d1b12b602915
files 2048.html
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/2048.html	Sun Aug 07 23:23:15 2016 +0300
+++ b/2048.html	Sun Aug 07 23:24:28 2016 +0300
@@ -545,7 +545,7 @@
       return true;
     }
 
-    ui.game.prepare = function() {
+    ui.game.prepareStep = function() {
       ui.suggestion.clear();
       ui.game.clearMessage();
       if (ui.game.checkGameOver())
@@ -621,7 +621,7 @@
         ui.game.setMessage('Select AI!');
         return;
       }
-      if ( ! ui.game.prepare())
+      if ( ! ui.game.prepareStep())
         return;
       var tmpBrd = board.create();
       board.copy(ui.board.position, tmpBrd);
@@ -637,7 +637,7 @@
         ui.game.setMessage('Select AI!');
         return;
       }
-      if ( ! ui.game.prepare())
+      if ( ! ui.game.prepareStep())
         return;
       var tmpBrd = board.create();
       board.copy(ui.board.position, tmpBrd);
@@ -651,7 +651,7 @@
     document.getElementById("step").addEventListener("click", ui.action.step, false);
 
     ui.action.visualFinishAux = function() {
-      if ( ! ui.game.prepare())
+      if ( ! ui.game.prepareStep())
         return;
       var brd = board.create();
       board.copy(ui.board.position, brd);
@@ -679,7 +679,7 @@
         ui.game.setMessage('Select AI!');
         return;
       }
-      ui.game.prepare();
+      ui.game.prepareStep();
       var step = 0;
       var safeBdr = board.create();
       var tsFrom = new Date().getTime();
@@ -717,7 +717,7 @@
         ui.game.setMessage('Select AI!');
         return;
       }
-      if ( ! ui.game.prepare())
+      if ( ! ui.game.prepareStep())
         return;
       var step = 0;
       var safeBdr = board.create();