Conversation
Except for crazyhouse in practice mode for now.
76a0d0f to
46ae323
Compare
There was a problem hiding this comment.
Pull request overview
This PR expands variant support (notably Atomic and other non-standard variants) across the app, including UI variant pickers, TV channels, and board rendering features needed for Atomic gameplay.
Changes:
- Enable additional supported variants for play/TV/analysis (e.g., Atomic, Three Check, Crazyhouse) and update related tests.
- Add Atomic “explosion squares” support and plumb it through game/analysis layouts to the chessboard widget.
- Improve offline computer game variant handling (variant selection, chess960 start positions, engine work items using the game’s variant, perf derived from variant).
Reviewed changes
Copilot reviewed 23 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/view/tournament/tournament_list_screen_test.dart | Updates tournament list expectations to include newly supported variants. |
| test/view/analysis/analysis_screen_test.dart | Updates analysis variant list expectations to include Atomic. |
| test/model/tv/tv_repository_test.dart | Updates expected TV channel count after enabling more channels. |
| pubspec.lock | Dependency lock updates (including chessground). |
| lib/src/widgets/game_layout.dart | Adds explosionSquares plumbing from layout to board widget. |
| lib/src/widgets/board.dart | Passes explosionSquares into Chessboard. |
| lib/src/view/watch/tv_screen.dart | Computes and supplies Atomic explosion squares during TV playback. |
| lib/src/view/play/create_game_widget.dart | Uses playSupportedVariants for the variant picker (excluding from-position). |
| lib/src/view/play/create_challenge_bottom_sheet.dart | Uses playSupportedVariants for challenge variant choices. |
| lib/src/view/over_the_board/over_the_board_screen.dart | Supplies Atomic explosion squares for OTB mode replays. |
| lib/src/view/offline_computer/offline_computer_game_screen.dart | Adds offline vs-computer variant selection and variant-aware board/analysis inputs. |
| lib/src/view/game/game_body.dart | Supplies Atomic explosion squares for live games/replay cursor. |
| lib/src/view/correspondence/offline_correspondence_game_screen.dart | Supplies Atomic explosion squares for offline correspondence replay cursor. |
| lib/src/view/analysis/analysis_board.dart | Feeds explosionSquares from analysis state into the board widget. |
| lib/src/utils/chessboard.dart | Introduces atomicExplosionSquares() helper to compute explosion highlights from position+move. |
| lib/src/model/tv/tv_channel.dart | Enables Atomic and Three Check TV channels in the enum. |
| lib/src/model/study/study_controller.dart | Mixes in shared explosion-square computation for studies. |
| lib/src/model/offline_computer/offline_computer_game_preferences.dart | Persists selected variant in offline-computer preferences. |
| lib/src/model/offline_computer/offline_computer_game_controller.dart | Makes offline engine work and initial-state creation variant-aware (incl. chess960 initial FEN). |
| lib/src/model/common/chess.dart | Expands readSupportedVariants / playSupportedVariants to include more variants. |
| lib/src/model/broadcast/broadcast_analysis_controller.dart | Mixes in shared explosion-square computation for broadcast analysis. |
| lib/src/model/analysis/retro_controller.dart | Implements new explosionSquares requirement (currently returns null). |
| lib/src/model/analysis/common_analysis_state.dart | Adds explosionSquares to analysis state interface + AnalysisExplosionMixin implementation. |
| lib/src/model/analysis/analysis_controller.dart | Mixes in shared explosion-square computation for analysis state. |
| ios/Podfile.lock | iOS pods lock update (Firebase / SDWebImage versions). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @override | ||
| ISet<Square>? get explosionSquares => null; |
There was a problem hiding this comment.
RetroState hard-codes explosionSquares => null, so atomic games shown in Retro (learn from mistakes) will never display explosion animations even though other game/analysis surfaces now support it via AnalysisExplosionMixin / atomicExplosionSquares. Consider computing explosionSquares for Retro as well (e.g., by adding the needed tree/root reference to RetroState and mixing in AnalysisExplosionMixin, or by storing the parent position in state and computing from it).
No description provided.