/** * Returns the next round in the game. * If this is a repeated step, then the next round is the next repetition of this step * (unless this is the last repetition). * Otherwise, it is the 0-th repetition of the next step. * * @see Step::nextStep() * @throws DoesNotExistException if there is no next step * @return Round the next round */ public function nextRound() { if ($this->repetition < $this->step->repeat) { return new Round($this->step, $this->repetition + 1); } else { return new Round($this->step->nextStep(), 0); } }