/** * Return the average available time per move * * @return float **/ protected function calculateTimePerMove(Game $game) { if ($clock = $game->getClock()) { $totalTime = $clock->getLimit() + $game->getFullmoveNumber() * $clock->getIncrement(); $timePerMove = $totalTime / $game->getFullmoveNumber(); } else { $timePerMove = 60; } return $timePerMove; }