Skip to content

More variant support#2705

Merged
veloce merged 10 commits intomainfrom
more_variant_support
Mar 4, 2026
Merged

More variant support#2705
veloce merged 10 commits intomainfrom
more_variant_support

Conversation

@veloce
Copy link
Copy Markdown
Contributor

@veloce veloce commented Mar 3, 2026

No description provided.

@veloce veloce mentioned this pull request Mar 3, 2026
24 tasks
@veloce veloce force-pushed the more_variant_support branch from 76a0d0f to 46ae323 Compare March 4, 2026 09:54
@veloce veloce marked this pull request as ready for review March 4, 2026 10:14
@veloce veloce requested a review from Copilot March 4, 2026 10:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +529 to +530
@override
ISet<Square>? get explosionSquares => null;
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
@veloce veloce merged commit 22a39da into main Mar 4, 2026
1 check passed
@veloce veloce deleted the more_variant_support branch March 4, 2026 11:01
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