function startGame() {
  var startButton = document.getElementById('start');
  startButton.style.display = 'none';

  lines = 0;
  document.getElementById('lines').textContent = lines;
  recalculateSpeed();
  initDataGrid();
  // Delete any existing blocks.
  if (currentShape) {
    currentShape.destroy();
  }
  var matrix = document.getElementById('matrix');
  while (matrix.firstChild) {
    matrix.removeChild(matrix.firstChild);
  }
  nextShapeName = randomShapeName();
  createShape();
  currentShapePid = requestAnimationFrame(animateStep);
}
// Hide the start button, and start the game.
Hide the start button, and start the game.
Hide the start button and start the game .
function startGame() {
  var startButton = document.getElementById('start');
  startButton.style.display = 'none';
  lines = 0;
  document.getElementById('lines').textContent = lines;
  recalculateSpeed();
  initDataGrid();
  if (currentShape) {
    currentShape.destroy();
  }
  var matrix = document.getElementById('matrix');
  while (matrix.firstChild) {
    matrix.removeChild(matrix.firstChild);
  }
  nextShapeName = randomShapeName();
  createShape();
  currentShapePid = requestAnimationFrame(animateStep);
}
function startGame ( ) { var startButton = document . getElementById ( 'start' ) ; startButton . style . display = 'none' ; lines = 0 ; document . getElementById ( 'lines' ) . textContent = lines ; recalculateSpeed ( ) ; initDataGrid ( ) ; if ( currentShape ) { currentShape . destroy ( ) ; } var matrix = document . getElementById ( 'matrix' ) ; while ( matrix . firstChild ) { matrix . removeChild ( matrix . firstChild ) ; } nextShapeName = randomShapeName ( ) ; createShape ( ) ; currentShapePid = requestAnimationFrame ( animateStep ) ; }
Hide the start button, and start the game.
Hide the start button and start the game .
// Delete any existing blocks.