-
Notifications
You must be signed in to change notification settings - Fork 49
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
Remove Uncertain
kind from Team type
#1427
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knoellle
added
the
is:Refactoring
No changes in functionality, only in coding style.
label
Aug 7, 2024
oleflb
requested changes
Aug 14, 2024
I basically changed everything again, see comment in PR description. |
oleflb
reviewed
Aug 28, 2024
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 good, but have not tested yet
oleflb
approved these changes
Oct 27, 2024
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.
Abfahrt 🚂
github-merge-queue
bot
removed this pull request from the merge queue due to no response for status checks
Oct 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why? What?
Team::Uncertain
is removed and wrapped with inOption
where applicable (only inFilteredGameState::Ready
)Update: there is now only one kicking team in the
GameControllerState
and thePlaying
state contains a flag whether the kicking_team sent by the game controller is trustworthy.This resolves the necessity to match the uncertain Team kind in places where it is always either Hulks or Opponent anyways.
This was especially annoying with the new behavior simulator but I wanted to make this a separate PR.
Background
The FilteredGameControllerState contains a
kicking_team
field as well as two fields of typeFilteredGameState
, one for each team.The
FilteredGameState::Ready
kind is the only place in our code where theTeam
could beUncertain
and if it wasn't uncertain, then the kicking team inside this kind was equal to the kicking team in theFilteredGameState
.Fixes #
ToDo / Known Issues
Ideas for Next Iterations (Not This PR)
How to Test
Everything should work as before, there are no functional changes.