Skip to content

Add a new "move on release" board setting#99

Merged
veloce merged 3 commits into
mainfrom
move_on_release
Jun 17, 2026
Merged

Add a new "move on release" board setting#99
veloce merged 3 commits into
mainfrom
move_on_release

Conversation

@veloce

@veloce veloce commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Add ChessboardSettings.moveOnRelease: when enabled, a tap-to-move is committed on pointer release instead of pointer press, and a square target follows the finger so the destination can be adjusted before releasing.

Closes #93

Add `ChessboardSettings.moveOnRelease`: when enabled, a tap-to-move is
committed on pointer release instead of pointer press, and a square target
follows the finger so the destination can be adjusted before releasing.

Closes #93

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds an optional “move on release” interaction mode to the interactive chessboard, matching Chess.com-style tap-to-move behavior where the move is committed on pointer/touch release and the intended destination can be adjusted by sliding before lifting.

Changes:

  • Add ChessboardSettings.moveOnRelease to defer tap-to-move commitment until pointer up.
  • Update board gesture handling to show a square target that tracks the pointer while the destination is being chosen.
  • Add widget tests covering commit-on-release, sliding destination changes, target follower behavior, and invalid release handling.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
lib/src/board_settings.dart Introduces moveOnRelease setting with documentation, equality/hash, and copyWith support.
lib/src/widgets/board.dart Implements deferred tap-to-move flow with a follower target and commits on pointer up when enabled.
test/widgets/board_test.dart Adds focused widget tests validating the new move-on-release behavior and visuals.
example/lib/main.dart Adds a demo toggle in the example app to enable/disable move-on-release.
example/lib/atomic_game_page.dart Minor formatting-only adjustment.
CHANGELOG.md Documents the new setting in a 10.2.0 entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@veloce veloce merged commit fe33203 into main Jun 17, 2026
1 check 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.

Add an option to move on touch end when tapping two squares

2 participants