Skip to content

the ai mode, matchmaking/join bug fix [release]#242

Merged
abdellah-darni merged 10 commits into
mainfrom
dev/abde
May 27, 2026
Merged

the ai mode, matchmaking/join bug fix [release]#242
abdellah-darni merged 10 commits into
mainfrom
dev/abde

Conversation

@abdellah-darni

@abdellah-darni abdellah-darni commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes # (issue number)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (no functional changes, code improvement)
  • Breaking change (fix or feature that breaks existing functionality)

UI Changes

Did you add or modify the UI (e.g., added a new screen, button, or changed a layout)?

  • Yes
  • No

⚠️ If YES, you MUST provide a screenshot or screen recording below:

Before (if applicable) After

Testing

  • Tested locally on an Emulator/Simulator
  • Tested locally on a Physical Device

Checklist

  • I have performed a self-review of my code.
  • I have run dart format . to ensure the code is properly styled.
  • I have verified that flutter analyze passes locally (no warnings).
  • I have verified that dart run custom_lint passes locally.
  • My changes do not generate new UI overflow errors.

- 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
abdellah-darni merged commit b0bb6cc into main May 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants