the ai mode, matchmaking/join bug fix [release]#242
Merged
Conversation
… game joined notification
…uest and updating related services
- Update `GameRepository` to support optional `AiDifficulty` when creating a game. - Add `AiSetupScreen` route to the application router. - Update `PlayNowSection` to navigate to the AI setup screen and mark AI matches as "Online". - Modify `GameScreen` and `GameScreenParams` to handle and display AI difficulty levels.
- Wrap `_controller.forward()` with `unawaited` to handle the returned Future. - Remove unused `scheme` and `textTheme` variables in `_WinRateBar`. - Clean up minor whitespace.
- Create `AiDifficulty` enum with display names and descriptions for easy, medium, and hard levels. - Implement `AiSetupScreen` to allow players to select AI strength before starting a PvE game. - Integrate game creation logic and navigation to the game screen via `GameRepository` and `GoRouter`.
- Update `gameService.createGame` calls across all test cases to include the new `AiDifficulty` argument. - Configure tests to use `AiDifficulty.HARD` for PvE game modes and `null` for PvP modes.
abdellah-darni
requested review from
AmineSidki,
Hajar-ELHILALI,
Ilyass-Bougati and
Yasminekoulam
May 27, 2026 10:15
AmineSidki
approved these changes
May 27, 2026
This file contains hidden or 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
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.
Description
Fixes # (issue number)
Type of Change
UI Changes
Did you add or modify the UI (e.g., added a new screen, button, or changed a layout)?
Testing
Checklist
dart format .to ensure the code is properly styled.flutter analyzepasses locally (no warnings).dart run custom_lintpasses locally.