Skip to content

Ignore same-color move validation probes#11

Open
Bortseb wants to merge 1 commit into
shaack:masterfrom
Bortseb:fix/reselect-illegal-sound
Open

Ignore same-color move validation probes#11
Bortseb wants to merge 1 commit into
shaack:masterfrom
Bortseb:fix/reselect-illegal-sound

Conversation

@Bortseb

@Bortseb Bortseb commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • recognize failed same-color validation as piece re-selection rather than an illegal move
  • avoid publishing the illegal-move sound and markers for that gesture
  • preserve legal Chess960 king-to-rook castling, which succeeds before this guard

Fixes #10.

Test plan

  • node --check src/players/LocalPlayer.js
  • Browser test: re-select another own piece; no wrong-move sound or markers fire
  • Browser test: illegal moves to empty/opponent squares still report normally

Keep piece re-selection from publishing an illegal move while preserving legal Chess960 castling validation.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Illegal-move sound on piece re-selection after dragging a piece back to its origin

1 participant