fix: checkout helper logic - #21
Conversation
BySplashGm
left a comment
There was a problem hiding this comment.
Thanks for fixing the invalid sectors (D21, D22, D24 don't exist — those were real bugs).
The score_validator.dart cleanup is fine assuming isValidSector already guards against rawValue > 20, which it does.
Main concern: the new checkout suggestions for 2- and 3-dart finishes heavily favour starting on a Double (e.g. 62: ['D11', 'D20'], 66: ['D13', 'D20']). In practice, triples are easier to aim for than doubles — the segments are larger — so standard checkout charts always prioritise Triples as the first dart. For example:
- 62 →
T10, D16orT14, D10 - 66 →
T10, D18 - 81 →
T19, D12
The old code was closer to convention here, even if it had some invalid sectors. The fix should address the invalid sectors without changing the Triple-first logic.
Do you have unit tests covering CheckoutHelper? Given how many values changed, tests would help catch any arithmetic errors.
|
Hi, can I still work on this? |
Changes checkout helper logic.