Team3309 / 6CimDrive

Off-season of 2015 season, 6 Cim Drive
0 stars 0 forks source link

Having a separate boolean for enable/disable state of each state is a recipe for disaster #8

Closed vmagro closed 9 years ago

vmagro commented 9 years ago

Speaking from experience, it is really easy to forget to update all necessary variables when some are linked like this. Instead of having haloDriveEnabled and tankDriveEnabled, you should use an int for driveMode and private static final ints to represent something like MODE_HALO_DRIVE = 0 MODE_TANK_DRIVE = 1, etc and check if driveMode == one of those (this way you could also have more than 2 states)