Quote:
Originally Posted by cadandcookies
Considering it's an extremely narrow set of possibilities, I would think it would be easy to add some edge-case handling code for the rare matches where negative scores are possible. In these cases, teleop would simply be zero. In most other cases, I think Brian's method seems reasonable, but I also haven't thought through the problem terribly much.
|
Option 3:
Code:
function matchTotalGears(match):
if match.rotor4Engaged: return 12
if match.rotor3Engaged: return 6
if match.rotor2Engaged: return 2
else: return 0
function matchAutoGears(match):
if match.rotor2Auto: return 3
if match.rotor1Auto: return 1
else: return 0
function matchTeleopGears(match):
if matchTotalGears(match) - matchAutoGears(match) < 0: return 0
else: return matchTotalGears(match) - matchAutoGears(match)
My biggest complaint about this method is that we lose the nice linear relationship between these 3 parameters. I tend to like linear relationships, so I would probably prefer one of the first two options over this one.