import java.util.*;
import java.io.*;

public class RemoteControl
{
    public static final String INSTRUCTIONS = "instructions.txt";

    public static void main (String[] args)
    {
        boolean debug = false;

        for (int i = 0; i < args.length; i++)
        {
            if ("-help".equals(args[i]))
            {
                System.out.println("Usage: [-debug] [-help]");
                System.exit(0);
            }

            if ("-debug".equals(args[i]))
                debug = true;
        }

        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        String[] values = null;

        try
        {
            reader = new BufferedReader(new FileReader(INSTRUCTIONS));
            String line = null;

            while ((line = reader.readLine()) != null)
            {
                values = line.split(Intcode.DELIMITER);
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        Vector<String> instructions = new Vector<String>();

        instructions.addAll(Arrays.asList(values));

        RepairDroid droid = new RepairDroid(instructions, debug);
        int steps = droid.moveToOxygenStation();

        System.out.println("Number of steps to reach oxygen station: "+steps);

        //droid.mapEntireMaze();
    }
}
@@ -208,16 +208,55 @@
 = false;
+%0A        boolean stepsToOxygen = false;
 %0A%0A      
@@ -411,16 +411,25 @@
 %5B-debug%5D
+ %5B-steps%5D
  %5B-help%5D
@@ -513,32 +513,32 @@
 quals(args%5Bi%5D))%0A
-
                 
@@ -550,16 +550,97 @@
  = true;
+%0A%0A            if (%22-steps%22.equals(args%5Bi%5D))%0A                stepsToOxygen = true;
 %0A       
@@ -1496,16 +1496,58 @@
 debug);%0A
+%0A        if (stepsToOxygen)%0A        %7B%0A    
         
@@ -1584,24 +1584,28 @@
 Station();%0A%0A
+    
         Syst
@@ -1675,19 +1675,53 @@
 s);%0A
-%0A        //
+        %7D%0A        else%0A        %7B%0A            
 droi
@@ -1735,19 +1735,29 @@
 tireMaze();%0A
+        %7D%0A
     %7D%0A%7D

Update RemoteControl.java