2048.html
changeset 146 a7b42ea88ac5
parent 138 23cd36180bf9
child 155 1f8df90bd338
equal deleted inserted replaced
144:b19b85b476b3 146:a7b42ea88ac5
   502       if (ui.game.dirs.indexOf(move) === -1) {
   502       if (ui.game.dirs.indexOf(move) === -1) {
   503         ui.game.setMessage("AI can't find move!");
   503         ui.game.setMessage("AI can't find move!");
   504         return false;
   504         return false;
   505       }
   505       }
   506       if ( ! board.move[move].call(null, tmpBrd)) {
   506       if ( ! board.move[move].call(null, tmpBrd)) {
   507         ui.game.setMessage("AI move "+move+" is ivalid!");
   507         ui.game.setMessage("AI move '"+move+"' is ivalid!");
   508         return false;
   508         return false;
   509       }
   509       }
   510       return true;
   510       return true;
   511     }
   511     }
   512 
   512