src/demo/Maze.java
public boolean isDeadend() {
            int connectCount = 0;
            for (int index = 0; index < 4; index++) {
                if (isConnected(index)) connectCount++;
            }
            return connectCount == 1;
        }
/**
         * Checks if cell is dead end i.e. is has only one open direction.
         *
         * @return if true cell is dead end.
         */
Checks if cell is dead end i.e. is has only one open direction.
@return if true cell is dead end.
Checks if cell is dead end i . e . is has only one open direction . @return if true cell is dead end .
public boolean isDeadend() {
            int connectCount = 0;
            for (int index = 0; index < 4; index++) {
                if (isConnected(index)) connectCount++;
            }
            return connectCount == 1;
        }
public boolean isDeadend ( ) { int connectCount = 0 ; for ( int index = 0 ; index < 4 ; index ++ ) { if ( isConnected ( index ) ) connectCount ++ ; } return connectCount == 1 ; }
Checks if cell is dead end i.e.
Checks if cell is dead end i . e .