# HG changeset patch # User Oleksandr Gavenko # Date 1470601395 -10800 # Node ID 754796e567ab5e5f9bd0dd2e2ba0bbf4b38e71d6 # Parent 9520465a9c60369456da92881ca103104eede504 Rename function. diff -r 9520465a9c60 -r 754796e567ab 2048.html --- a/2048.html Sun Aug 07 23:17:47 2016 +0300 +++ b/2048.html Sun Aug 07 23:23:15 2016 +0300 @@ -545,7 +545,7 @@ return true; } - ui.game.beginStep = function() { + ui.game.prepare = function() { ui.suggestion.clear(); ui.game.clearMessage(); if (ui.game.checkGameOver()) @@ -621,7 +621,7 @@ ui.game.setMessage('Select AI!'); return; } - if ( ! ui.game.beginStep()) + if ( ! ui.game.prepare()) return; var tmpBrd = board.create(); board.copy(ui.board.position, tmpBrd); @@ -637,7 +637,7 @@ ui.game.setMessage('Select AI!'); return; } - if ( ! ui.game.beginStep()) + if ( ! ui.game.prepare()) 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.beginStep()) + if ( ! ui.game.prepare()) return; var brd = board.create(); board.copy(ui.board.position, brd); @@ -679,7 +679,7 @@ ui.game.setMessage('Select AI!'); return; } - ui.game.beginStep(); + ui.game.prepare(); 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.beginStep()) + if ( ! ui.game.prepare()) return; var step = 0; var safeBdr = board.create();