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

        FunctionRoutine fr = new FunctionRoutine(EXAMPLE, debug);
        Vector<MovementFunction> functions = fr.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));
                }
            }

            MovementRoutine mr = new MovementRoutine(EXAMPLE, functions, debug);

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

    private Verifier ()
    {
    }
}
@@ -200,16 +200,73 @@
 ,6,L,2%22;
+%0A    public static final String RESULT = %22A,C,B,C,A,B,B%22;
 %0A%0A    pu
@@ -339,16 +339,76 @@
 = false;
+%0A        int maxCharacters = FunctionRoutine.MAX_CHARACTERS;
 %0A%0A      
@@ -554,16 +554,33 @@
 (%22Usage:
+ %5B-char %3Cnumber%3E%5D
  %5B-debug
@@ -710,16 +710,359 @@
  = true;
+%0A%0A            if (%22-char%22.equals(args%5Bi%5D))%0A            %7B%0A                try%0A                %7B%0A                    maxCharacters = Integer.parseInt(args%5Bi+1%5D);%0A                %7D%0A                catch (Exception ex)%0A                %7B%0A                    ex.printStackTrace();%0A%0A                    System.exit(0);%0A                %7D%0A            %7D
 %0A       
@@ -1122,16 +1122,31 @@
 EXAMPLE,
+ maxCharacters,
  debug);
@@ -1797,24 +1797,200 @@
 nRoutine());
+%0A%0A            if (RESULT.equals(mr.getMainRoutine()))%0A                System.out.println(%22Verified ok.%22);%0A            else%0A                System.out.println(%22Verify failed!%22);
 %0A        %7D%0A 

Update Verifier.java