public class OxygenFiller
{
    public OxygenFiller (Maze theMaze, boolean debug)
    {
        _theMaze = theMaze;
        _debug = debug;
    }

    // trace through the maze until we get back to the start

    public int fillWithOxygen ()
    {
        int steps = 0;

        return steps;
    }

    /*
     * If we run into a wall then try a different direction.
     * If we can't move other than backwards then do that.
     * Don't move into areas we've already been.
     */
    
    private int fill ()
    {
        int response = DroidStatus.ERROR;

        while (!stopSearch())
        {
            boolean needToBackup = false;

            /*
             * We search N, E, S and then W.
             */

            response = tryToMove(String.valueOf(DroidMovement.NORTH), DroidMovement.getNextPosition(_currentLocation, DroidMovement.NORTH));

            if (tryNextLocation(response))
            {
                response = tryToMove(String.valueOf(DroidMovement.EAST), DroidMovement.getNextPosition(_currentLocation, DroidMovement.EAST));

                if (tryNextLocation(response))
                {
                    response = tryToMove(String.valueOf(DroidMovement.SOUTH), DroidMovement.getNextPosition(_currentLocation, DroidMovement.SOUTH));

                    if (tryNextLocation(response))
                    {
                        response = tryToMove(String.valueOf(DroidMovement.WEST), DroidMovement.getNextPosition(_currentLocation, DroidMovement.WEST));

                        if (tryNextLocation(response))
                        {
                            /*
                             * At this point we've exhausted all of the options for moving from
                             * the current location. Therefore, we need to backtrack.
                             */

                            needToBackup = true;
                        }
                    }
                }
            }

            if (needToBackup)
                backtrack();
        }

        return response;
    }

    private Maze _theMaze;
    private boolean _debug;
}
@@ -559,53 +559,8 @@
 OR;%0A
-%0A        while (!stopSearch())%0A        %7B%0A    
     
@@ -594,36 +594,32 @@
 false;%0A%0A        
-    
 /*%0A             
@@ -614,20 +614,16 @@
         
- 
-   
 * We sea
@@ -651,36 +651,28 @@
 W.%0A         
-    */%0A%0A    
+*/%0A%0A
         resp
@@ -809,61 +809,53 @@
     
-    if (tryNextLocation(response))%0A            %7B%0A    
+if (response != DroidStatus.MOVED)%0A        %7B%0A
     
@@ -1006,47 +1006,43 @@
     
-    if (tryNextLocation(response))%0A    
+if (response != DroidStatus.MOVED)%0A
     
@@ -1043,36 +1043,32 @@
 )%0A            %7B%0A
-    
                 
@@ -1217,47 +1217,43 @@
     
-    if (tryNextLocation(response))%0A    
+if (response != DroidStatus.MOVED)%0A
     
@@ -1258,36 +1258,32 @@
               %7B%0A
-    
                 
@@ -1438,47 +1438,43 @@
     
-    if (tryNextLocation(response))%0A    
+if (response != DroidStatus.MOVED)%0A
     
@@ -1483,36 +1483,32 @@
               %7B%0A
-    
                 
@@ -1546,17 +1546,16 @@
         
- 
 * At thi
@@ -1613,17 +1613,16 @@
 ng from%0A
- 
         
@@ -1718,33 +1718,32 @@
                 
- 
 */%0A%0A            
@@ -1754,20 +1754,16 @@
         
- 
-   
 needToBa
@@ -1791,33 +1791,26 @@
             
-    %7D%0A   
+%7D%0A
             
@@ -1805,39 +1805,34 @@
                 
- 
 %7D%0A
-    
             %7D%0A  
@@ -1821,36 +1821,32 @@
 %7D%0A            %7D%0A
-    
         %7D%0A%0A     
@@ -1844,28 +1844,24 @@
  %7D%0A%0A        
-    
 if (needToBa
@@ -1878,20 +1878,16 @@
         
-    
 backtrac
@@ -1890,26 +1890,16 @@
 track();
-%0A        %7D
 %0A%0A      

Update OxygenFiller.java