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