03-19-2025, 06:05 AM
The issue is that `score` isn't cumulative, instead it's set equal to `Pick * 10 - TimePenalty` on each loop. `TimePenalty` is only the penalty for the current loop, it doesn't include any penalties for previous loops - even though there was a 1 point penalty on the previous loop to get 39 that penalty is lost when you do the next loop and `TimePenalty` is set to 0 (because you're within the 5 second window).
A simple solution is to do `TimePenalty = TimePenalty + Int((T2 - T1) / 5)`, that way `TimePenalty` will include any penalties from previous loops.
Alternatively you could stop using `Pick` and do `Score = Score + 10 - TimePenalty`, so that way score retains the penalties.
Of course, don't do both of the options or you'll double-count the penalties
A simple solution is to do `TimePenalty = TimePenalty + Int((T2 - T1) / 5)`, that way `TimePenalty` will include any penalties from previous loops.
Alternatively you could stop using `Pick` and do `Score = Score + 10 - TimePenalty`, so that way score retains the penalties.
Of course, don't do both of the options or you'll double-count the penalties
