Skip to content
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

default opponent goalkeeper number when above 7 #1123

Conversation

MaikRe
Copy link
Contributor

@MaikRe MaikRe commented Jul 9, 2024

Why? What?

If the opponent uses a playernumber above 7 for the goalkeeper the message filter bails and we discard the message aka we don't receive any information from the game controller and don't go into the standby phase and cannot play at all!
This defaults it to PlayerNumber::One.

To the reviewer, the One is sort of arbitrary, I could just do default() but either way that information is inaccurate.
Let me know what you think.

Fixes #

ToDo / Known Issues

Ideas for Next Iterations (Not This PR)

#1021

How to Test

Use current main:
Before going into standby, substitute the opponent goalkeeper with a number higher than 7.
Then click standby button and observe that we don't do anything.
Also the error logs can be looked at.

Now use the new code and repeat the procedure and oh wow now it works.

@MaikRe MaikRe force-pushed the in_der_schule_die_zahl_8_nie_gelernt_und_deswegen_is_aus_dir_nix_geworden branch from 02563b3 to 295f503 Compare July 9, 2024 14:10
@MaikRe MaikRe added this pull request to the merge queue Jul 10, 2024
Merged via the queue into HULKs:main with commit 717ba1a Jul 10, 2024
25 checks passed
@MaikRe MaikRe deleted the in_der_schule_die_zahl_8_nie_gelernt_und_deswegen_is_aus_dir_nix_geworden branch July 10, 2024 07:36
oleflb pushed a commit to oleflb/hulk that referenced this pull request Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants