2048.html
changeset 137 be8ee2240a17
parent 134 5b772474bf17
child 138 23cd36180bf9
equal deleted inserted replaced
136:4a143572b9d2 137:be8ee2240a17
   662         }
   662         }
   663         step++; 
   663         step++; 
   664       }
   664       }
   665       var tsTo = new Date().getTime();
   665       var tsTo = new Date().getTime();
   666       ui.board.turn += step;
   666       ui.board.turn += step;
   667       ui.game.finishStep();
   667       ui.game.refresh();
   668       ui.score.speed(parseFloat((step*1000.0/(tsTo-tsFrom)).toPrecision(3)));
   668       ui.score.speed(parseFloat((step*1000.0/(tsTo-tsFrom)).toPrecision(3)));
   669       ui.game.setMessage("Game over!");
   669       ui.game.setMessage("Game over!");
   670       ui.ai.current.cleanup();
   670       ui.ai.current.cleanup();
   671     }
   671     }
   672     document.getElementById("finish").addEventListener("click", ui.action.finish, false);
   672     document.getElementById("finish").addEventListener("click", ui.action.finish, false);