src/demo/Maze.java
public Cell passTo(Cell from) {
            if (canConnectTo(from)) {
                setConnected();
                Objects.requireNonNull(getTo(from)).setVisited();
                return getTo(from);
            }
            else return null;
        }
/**
         * Creates connection to neighbor from given cell.
         *
         * @param from cell from where connection is created.
         * @return return reference to connected cell and if connection cannot be created returns null.
         */
Creates connection to neighbor from given cell.
@param from cell from where connection is created.
@return return reference to connected cell and if connection cannot be created returns null.
Creates connection to neighbor from given cell . @param from cell from where connection is created . @return return reference to connected cell and if connection cannot be created returns null .
public Cell passTo(Cell from) {
            if (canConnectTo(from)) {
                setConnected();
                Objects.requireNonNull(getTo(from)).setVisited();
                return getTo(from);
            }
            else return null;
        }
public Cell passTo ( Cell from ) { if ( canConnectTo ( from ) ) { setConnected ( ) ; Objects . requireNonNull ( getTo ( from ) ) . setVisited ( ) ; return getTo ( from ) ; } else return null ; }
Creates connection to neighbor from given cell.
Creates connection to neighbor from given cell .