Consider assigning this magic number 2 to a constant.
Using constants for hard-coded numbers is a best practice. A constant’s name can explain the rationale
behind this magic number. It is also easier to find if you ever need to change it.
Loading history...
17
return Position.LEFT;
18
} else {
19
return Position.RIGHT;
20
}
21
}
22
23
public static Position getSwitch() {
24
if (DriverStation.getInstance().getGameSpecificMessage().charAt(1) == 'L') {