/** * BFS routine Using Queue, this solve() method is doing BFS. enqueue all children and dequeue * them until it gets final point. */ public void solve() { MazeCell N, S, E, W; Stack<Object> s = new Stack<Object>(); MazeCell startCell = new MazeCell(startx, starty - 1, ' '); startCell.Mark(); s.push(startCell); while (!s.isEmpty()) {} System.out.println(); System.out.println("Maze not solvable!"); System.out.println(); }