make 'pass' commands for all the defenses that just have to be driven over
[3501/stronghold-2016] / src / org / usfirst / frc / team3501 / robot / commands / DefaultAutonStrategy.java
index fbf2d22c64f43f7f52119a951899b69fb2ce7c47..eccd96682b860470712f53154f6b85aa9e909acf 100755 (executable)
@@ -1,28 +1,65 @@
 package org.usfirst.frc.team3501.robot.commands;
 
+import org.usfirst.frc.team3501.robot.Constants.Defense;
+
 import edu.wpi.first.wpilibj.command.CommandGroup;
 
 /**
- *
+ * The default autonomous strategy involves passing the defense that is in front
+ * of it, aiming the robot/ shooter towards the goal, and shooting.
  */
+
 public class DefaultAutonStrategy extends CommandGroup {
-    
-    public  DefaultAutonStrategy() {
-        // Add Commands here:
-        // e.g. addSequential(new Command1());
-        //      addSequential(new Command2());
-        // these will run in order.
-
-        // To run multiple commands at the same time,
-        // use addParallel()
-        // e.g. addParallel(new Command1());
-        //      addSequential(new Command2());
-        // Command1 and Command2 will run in parallel.
-
-        // A command group will require all of the subsystems that each member
-        // would require.
-        // e.g. if Command1 requires chassis, and Command2 requires arm,
-        // a CommandGroup containing them would require both the chassis and the
-        // arm.
+
+  public DefaultAutonStrategy(int position, Defense defense) {
+
+    switch (defense) {
+
+    case PORTCULLIS:
+
+      addSequential(new LiftPortcullis());
+
+    case SALLY_PORT:
+
+      addSequential(new PassSallyPort());
+
+    case ROUGH_TERRAIN:
+
+      addSequential(new PassRoughTerrain());
+
+    case LOW_BAR:
+
+      addSequential(new PassLowBar());
+
+    case CHEVAL_DE_FRISE:
+
+      addSequential(new PassChevalDeFrise());
+
+    case DRAWBRIDGE:
+
+      addSequential(new PassDrawBridge());
+
+    case MOAT:
+
+      addSequential(new PassMoat());
+
+    case ROCK_WALL:
+
+      addSequential(new PassRockWall());
+
+    case RAMPART:
+
+      addSequential(new PassRampart());
+
+    default:
+      break;
     }
+
+    // TODO: put in the argument that goes inside of aim, based on the position
+    // variable that was passed into the command group
+    addSequential(new Aim());
+    addSequential(new Shoot());
+
+  }
+
 }