@@ -0,0 +1,1676 @@
+package com.qualcomm.ftcrobotcontroller.geekmybot;%0D%0A%0D%0Aimport java.util.List;%0D%0A%0D%0A/**%0D%0A * Created by David Lempia on 7/20/2015.%0D%0A */%0D%0Apublic class Behaviors_Joystick2 implements Behaviors %7B%0D%0A%0D%0A    // Add the behaviors and events%0D%0A    Behavior activeBehavior;%0D%0A    public Behaviors_Joystick2(GlobalData gd)%7B%0D%0A%0D%0A        // Create the behaviors - Input is the name of the behavior for debug%0D%0A        Behavior behaviorJsArcade = new Behavior_JsArcade(gd, %22Js Arcade%22);%0D%0A        Behavior behaviorJsTank = new Behavior_JsTank(gd, %22Js Tank%22);%0D%0A%0D%0A        // Create the events (lines)%0D%0A        behaviorJsArcade.addEvent( new Event_ButtonY(gd, behaviorJsTank));%0D%0A        behaviorJsTank.addEvent( new Event_ButtonY( gd, behaviorJsArcade));%0D%0A%0D%0A        // The start state for the state machine%0D%0A        activeBehavior = behaviorJsArcade;%0D%0A    %7D%0D%0A%0D%0A    // Do not change this. This stays constant%0D%0A    public void onLoop()%7B%0D%0A%0D%0A        List%3CEvent%3E el = activeBehavior.getEventList();%0D%0A%0D%0A        //Log.i(%22info%22, %22Made it to 1%22);%0D%0A        for (Event el1 : el)%7B%0D%0A            //Log.i(%22info%22, %22Made it to 2%22);%0D%0A            if (el1.isTriggered())%7B%0D%0A                // If the event happened, run exit, step, and entry code%0D%0A                activeBehavior.onExit();%0D%0A                el1.onTransition();%0D%0A%0D%0A                // Update the active state%0D%0A                activeBehavior = el1.getToBehavior();%0D%0A                activeBehavior.onEntry();%0D%0A                break; // Do not check the rest of the transitions%0D%0A            %7D%0D%0A        %7D%0D%0A        // Run active state%0D%0A        activeBehavior.onLoop();%0D%0A    %7D%0D%0A    public Behavior getActiveBehavior()%7B%0D%0A        return(this.activeBehavior);%0D%0A    %7D%0D%0A%7D%0D%0A

Add Behaviors_Joystick2.java for the GeekMyBot article