Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex handling movements subscription #39

Open
dkwach opened this issue Sep 10, 2024 · 0 comments
Open

Complex handling movements subscription #39

dkwach opened this issue Sep 10, 2024 · 0 comments

Comments

@dkwach
Copy link

dkwach commented Sep 10, 2024

Currently, a move event is generated after calling ChessBoardController.makeMoveWithPromotion or ChessBoardController.makeMove, even if the move is invalid. This causes subscribers to receive notifications for rejected moves, forcing client-side logic to handle both valid and invalid moves.

Proposed solutions:

  1. Include additional information in the event indicating whether the move was accepted or rejected.
  2. Introduce separate streams, such as approvedMovementsStream and rejectedMovementsStream.
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

No branches or pull requests

1 participant