src/GameOfLife/GameLogic.php
/**
     * Compares the newest board in the history with up to 15 previous boards.
     *
     * @return bool Indicates whether there's a repeating pattern
     *              True: Repeating pattern detected
     *              False: No repeating pattern detected
     */
Compares the newest board in the history with up to 15 previous boards.
@return bool Indicates whether there's a repeating pattern
True: Repeating pattern detected
False: No repeating pattern detected
Compares the newest board in the history with up to 15 previous boards . @return bool Indicates whether there ' s a repeating pattern True : Repeating pattern detected False : No repeating pattern detected
public function isLoopDetected(): bool
    {
        foreach ($this->historyOfBoards as $board)
        {
            if ($this->currentBoard == $board) return true;
        }
        return false;
    }
public function isLoopDetected ( ) : bool { foreach ( $ this -> historyOfBoards as $ board ) { if ( $ this -> currentBoard == $ board ) return true ; } return false ; }
Compares the newest board in the history with up to 15 previous boards.
Compares the newest board in the history with up to 15 previous boards .