@@ -0,0 +1,1365 @@
+import java.awt.Color;%0Aimport java.util.LinkedList;%0A%0Apublic class Robot%0A%7B%0A%09public Rectangle body; // Coordinates, Width, And Height Of Robot%0A%09public int currPos;%09   // Current Position%0A%09public Color color;%09   // Color Of Robot%0A%09public int myTurn;%09   // Robot's Turn To Push Button In Sequence%0A%09public int nextPos;    // Next Position Robot Has To Move To%0A%09public LinkedList%3CPair%3E mySeq;%09// Sequence For The Robot's Moves And Turns%0A%09public int tmp = 0;%0A%09public int cnt = 0;%0A%09%09%0A%09// Constructor%0A%09public Robot()%0A%09%7B%0A%09%09body = new Rectangle();%0A%09%09currPos = 1;%0A%09%09mySeq = new LinkedList%3CPair%3E();%0A%09%7D%0A%09%0A%09// Move Function%0A%09public void move()%0A%09%7B%0A%09%09if(nextPos %3E 50)%0A%09%09%7B%0A%09%09%09if(cnt == 0)%0A%09%09%09%09tmp = nextPos;%0A%09%09%09nextPos -= 50;%0A%09%09%7D%0A%09%09if(currPos %3C nextPos && body.x != 1100)%0A%09%09%7B%0A%09%09%09body.x += 22;%0A%09%09%09++currPos;%0A%09%09%7D%0A%09%09else if(currPos %3E nextPos && body.x != 22)%0A%09%09%7B%0A%09%09%09body.x -= 22;%0A%09%09%09--currPos;%0A%09%09%7D%0A%09%09++cnt;%0A%09%7D%0A%09%0A%09// Reset Robot's Position/etc.%0A%09void reset()%0A%09%7B%0A%09%09body.x = 22;%0A%09%09currPos = 1;%0A%09%09tmp = 0;%0A%09%09cnt = 0;%0A%09%7D%0A%09%0A%09// Get Next Position And Turn Value For Robot From His Sequence%0A%09void fill()%0A%09%7B%0A%09%09if(!mySeq.isEmpty())%0A%09%09%7B%09%0A%09%09%09Pair temp = mySeq.removeFirst();%09%09%0A%09%09%09this.nextPos = temp.getSecond();%0A%09%09%09this.myTurn = temp.getFirst();%0A%09%09%7D%0A%09%7D%0A%09%0A%09// Add New Position And Turn Value To Robot's Sequence%0A%09void makeNew(int x, int y)%0A%09%7B%0A%09%09Pair temp = new Pair(x,y);%0A%09%09mySeq.add(temp);%0A%09%7D%0A%09%0A%7D%0A

Create Robot.java