src/GameOfLife/Inputs/BoardEditor/BoardEditor.php
/**
     * Restores the previous board of the history.
     *
     * @throws \Exception
     */
Restores the previous board of the history.
@throws \Exception
Restores the previous board of the history . @throws \ Exception
public function restorePreviousBoard()
    {
        if ($this->currentBoard == 0) throw new \Exception("There is no previous board in the history.");
        $this->currentBoard--;
        $this->board->copy($this->historyOfBoards[$this->currentBoard]);
    }
public function restorePreviousBoard ( ) { if ( $ this -> currentBoard == 0 ) throw new \ Exception ( " There is no previous board in the history. " ) ; $ this -> currentBoard -- ; $ this -> board -> copy ( $ this -> historyOfBoards [ $ this -> currentBoard ] ) ; }
Restores the previous board of the history.
Restores the previous board of the history .