-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KickDistributionStrategy type DistanceByIndex array length bug #18
Comments
I talked to @amanda-phet and we think that a validation error is the best way to handle this situation. We feel like at least updating |
Steps to reproduce for QA:
Screen.Recording.2024-08-06.at.11.26.29.AM.mov |
This is ready to cherry-pick above. @kathy-phet let me know if we would like this to be a part of a maintenance release for CAV. @amanda-phet do you want to change anything in examples.md? |
I don't think this warrants any changes to examples.md in MSaB, but will leave this assigned to @kathy-phet so she can weigh in on what to do for CaV (update examples.md to clarify the bug, or do a MR for CaV). |
(cherry picked from commit aa77e11)
While working on phetsims/mean-share-and-balance#334 I began to wonder how the BalancePoint screen would handle an array that was the incorrect size if passed into
KickDistributionStrategy
as typeDistanceByIndex
. I discovered that it does not handle this scenario. In fact none of the soccer sims do, which means this is a bug in the published version of Center and Variability as well. I am not sure how urgent it is to fix this bug for CAV.This is the documentation that exists:
This does indicate that clients must use an array of the correct length for
DistanceByIndex
but there is no validation to prevent this, and it will break the sim if the array they provide is shorter than the max number of kicks.What's more is this also is not taking into consideration how to handle when the number of MaxKicks changes. The documentation implies that your array should equal the max number of kicks you set in preferences, but says nothing about the fact that you need to update your array if the max number changes and you provided an array that is now too short.
Since this is a soccer-common bug the question is, does this need to be a maintenance release for CAV?
The text was updated successfully, but these errors were encountered: