private void animate() {
    long currentTime = System.currentTimeMillis();
    double turnDiff = turnsPerSecond * (currentTime - lastFrameTime) / 1000;
    turn = forward ? turn + turnDiff : turn - turnDiff;
    if (turn >= games.length - 1) {
      pauseButton.doClick();
      turn = games.length - 1;
    }
    if (turn <= 0) {
      pauseButton.doClick();
      turn = 0;
    }
    lastFrameTime = System.currentTimeMillis();
    update();
  }