-
Notifications
You must be signed in to change notification settings - Fork 63
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 references to equilibrium #744 #764
Remove references to equilibrium #744 #764
Conversation
…ass detection up the call stack out of game_service.py
Codecov Report
|
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.
Nice, looks pretty close!
server/lobbyconnection.py
Outdated
game_class = { | ||
FeaturedModType.LADDER_1V1: LadderGame, | ||
FeaturedModType.COOP: CoopGame, | ||
FeaturedModType.FAF: CustomGame, | ||
FeaturedModType.FAFBETA: CustomGame | ||
}.get(game_mode, Game) |
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.
We only need to check for coop here, and default to CustomGame
.
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.
Just use an if statement
@@ -15,6 +15,7 @@ async def test_create_game(players, game_service): | |||
game = game_service.create_game( | |||
visibility=VisibilityState.PUBLIC, | |||
game_mode="faf", | |||
game_class=CustomGame, |
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.
I think you could make this the default argument.
@@ -154,15 +151,6 @@ def create_game( | |||
"matchmaker_queue_id": matchmaker_queue_id, | |||
} | |||
game_args.update(kwargs) | |||
|
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.
I would definitely either make game_class
a required argument, or give it a sensible default. Defaulting to None
just doesn't make any sense anymore.
…e. Also simplified class detection in lobbyconnection.py.
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!
Remove references to equilibrium
I was able do three things as part of this change set.
FeaturedModType
enum and all referencesgame_service
classgame_service
tests to pass in a game class since the method signature technically changedPlease let me know if you have any questions or feedback for improvement!
Closes #744