Code:
case DRIVE_TO_TARGET:
case PASSED_TARGET:
the way the "switch" and "case" statements work, the code for PASSED_TARGET is actually executed for both the DRIVE_TO_TARGET state and the PASSED_TARGET state. you see how most "case" statements have a "break" statement at the end? that is to keep the code from the "case"s below from executing - the break statement makes the execution jump to the end of the current block, in this case the "switch". There's no "break" after DRIVE_TO_TARGET, so it just keeps on executing downwards, and thus it's just a shortcut so that both states have the same code.