flutter_chess_board icon indicating copy to clipboard operation
flutter_chess_board copied to clipboard

Complex handling movements subscription

Open dkwach opened this issue 1 year ago • 0 comments

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.

dkwach avatar Sep 10 '24 14:09 dkwach