| 1 | package org.usfirst.frc.team3501.robot.commands.auton; |
| 2 | |
| 3 | import org.usfirst.frc.team3501.robot.Constants.Defense; |
| 4 | import org.usfirst.frc.team3501.robot.commands.shooter.Shoot; |
| 5 | |
| 6 | import edu.wpi.first.wpilibj.command.CommandGroup; |
| 7 | |
| 8 | /** |
| 9 | * The default autonomous strategy involves passing the defense that is in front |
| 10 | * of it, aiming the robot/ shooter towards the goal, and shooting. |
| 11 | */ |
| 12 | |
| 13 | public class DefaultAutonStrategy extends CommandGroup { |
| 14 | |
| 15 | public DefaultAutonStrategy(int position, Defense defense) { |
| 16 | |
| 17 | switch (defense) { |
| 18 | |
| 19 | case PORTCULLIS: |
| 20 | |
| 21 | addSequential(new LiftPortcullis()); |
| 22 | |
| 23 | case SALLY_PORT: |
| 24 | |
| 25 | addSequential(new PassSallyPort()); |
| 26 | |
| 27 | case ROUGH_TERRAIN: |
| 28 | |
| 29 | addSequential(new PassRoughTerrain()); |
| 30 | |
| 31 | case LOW_BAR: |
| 32 | |
| 33 | addSequential(new PassLowBar()); |
| 34 | |
| 35 | case CHEVAL_DE_FRISE: |
| 36 | |
| 37 | addSequential(new PassChevalDeFrise()); |
| 38 | |
| 39 | case DRAWBRIDGE: |
| 40 | |
| 41 | addSequential(new PassDrawBridge()); |
| 42 | |
| 43 | case MOAT: |
| 44 | |
| 45 | addSequential(new PassMoat()); |
| 46 | |
| 47 | case ROCK_WALL: |
| 48 | |
| 49 | addSequential(new PassRockWall()); |
| 50 | |
| 51 | case RAMPART: |
| 52 | |
| 53 | addSequential(new PassRampart()); |
| 54 | |
| 55 | default: |
| 56 | break; |
| 57 | } |
| 58 | |
| 59 | addSequential(new AimAndAlign()); |
| 60 | addSequential(new Shoot()); |
| 61 | |
| 62 | } |
| 63 | |
| 64 | } |