-
Notifications
You must be signed in to change notification settings - Fork 0
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
Move intake scoring states to separate classes #56
Move intake scoring states to separate classes #56
Conversation
Thank you for making a pull request! Please make sure to follow the pull request guidelines for this PR. This applies to your commit messages, pull request code, and more! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks fine to me, just very confused about why we have 2 different approaches to scoring states
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for my information, why is low different from mid and high?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The speed of the intake seems to be higher when scoring low🤷. I just transferred over what was in the switch statement over to classes
* @param outtakeSpeed The speed that should be used to outtake the gamepiece | ||
* @param stateName The name of the scoring state that should be used for logging | ||
*/ | ||
protected ScoringState(double outtakeSpeed, String stateName) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This interface also seems like it could be simplified if we made all the strategies handle things the same way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, that was the approach I was trying to make in the beginning. But I found that it would just overcomplicate it if a state had different speeds for cones and cubes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestions on how I could maybe improve it so every state could be handled the same?
Description
Moved the scoring states for the intake to separate classes to improve organization and to remove the large conditional block
Fixes #51
Type of change
How Has This Been Tested?
N/A
Checklist: