import java.util.*;

/*
 * Aft Scaffolding Control and Information Interface.
 */

public class Verifier 
{
    public static final String EXAMPLE = "R,8,R,8,R,4,R,4,R,8,L,6,L,2,R,4,R,4,R,8,R,8,R,8,L,6,L,2";

    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;
        }

        Vector<String> values = IntcodeUtil.readValues(INSTRUCTIONS);
        Camera theCamera = new Camera(values, debug);
        Image theImage = theCamera.takePicture();
        
        if (debug)
        {
            System.out.println(theCamera);

            Vector<Coordinate> intersections = theCamera.scanForIntersections();
            Enumeration<Coordinate> iter = intersections.elements();

            while (iter.hasMoreElements())
            {
                System.out.println("Intersection at: "+iter.nextElement());
            }
        }

        Map theMap = new Map(theImage, debug);
        VacuumRobot theRobot = new VacuumRobot(theMap, IntcodeUtil.readValues(INSTRUCTIONS), debug);

        // print the camera's image/map
        
        System.out.println(theMap);

        MovementLogic ml = new MovementLogic(theMap, debug);

        Vector<MovementFunction> functions = ml.createMovementFunctions();

        if (functions.size() != MovementLogic.NUMBER_OF_FUNCTIONS)
            System.out.println("Got the wrong number of functions: "+functions.size());
        else
        {
            if (debug)
            {
                for (int i = 0; i < MovementLogic.NUMBER_OF_FUNCTIONS; i++)
                {
                    System.out.println("Function "+(i+1)+" is "+functions.elementAt(i));
                }
            }

            System.out.println("Routine is "+ml.getMainRoutine(functions));
        }
    }

    private ASCII ()
    {
    }
}
@@ -600,851 +600,56 @@
     
-Vector%3CString%3E values = IntcodeUtil.readValues(INSTRUCTIONS);%0A        Camera theCamera = new Camera(values, debug);%0A        Image theImage = theCamera.takePicture();%0A        %0A        if (debug)%0A        %7B%0A            System.out.println(theCamera);%0A%0A            Vector%3CCoordinate%3E intersections = theCamera.scanForIntersections();%0A            Enumeration%3CCoordinate%3E iter = intersections.elements();%0A%0A            while (iter.hasMoreElements())%0A            %7B%0A                System.out.println(%22Intersection at: %22+iter.nextElement());%0A            %7D%0A        %7D%0A%0A        Map theMap = new Map(theImage, debug);%0A        VacuumRobot theRobot = new VacuumRobot(theMap, IntcodeUtil.readValues(INSTRUCTIONS), debug);%0A%0A        // print the camera's image/map%0A        %0A        System.out.println(theMap);%0A%0A        MovementLogic ml = new MovementLogic(theMap
+FunctionRoutine fr = new FunctionRoutine(EXAMPLE
 , de
@@ -654,17 +654,16 @@
 debug);%0A
-%0A
         
@@ -699,18 +699,18 @@
 tions = 
-ml
+fr
 .createM
@@ -1153,32 +1153,114 @@
 %0A            %7D%0A%0A
+            MovementRoutine mr = new MovementRoutine(EXAMPLE, functions, debug);%0A%0A
             Syst
@@ -1289,17 +1289,17 @@
 e is %22+m
-l
+r
 .getMain
@@ -1306,25 +1306,16 @@
 Routine(
-functions
 ));%0A    
@@ -1343,13 +1343,16 @@
 ate 
-ASCII
+Verifier
  ()%0A

Update Verifier.java