code100x / chess

A multiplayer chess platform
https://chess.100xdevs.com/
1.62k stars 585 forks source link

fixes show legal moves for different pieces after selecting other pieces #250

Closed Jett-Code closed 7 months ago

Jett-Code commented 7 months ago

Fixes #99 Fixes showing legal moves for knight or other pieces after select a pawn or something. Key changes:-

  1. Modified the onClick handler to deselect the previously selected piece when a new piece is clicked.
  2. Implemented one-click logic to show legal moves for a selected piece without requiring an additional click.
Jett-Code commented 7 months ago

TESTING:-

https://github.com/code100x/chess/assets/64737847/cefe7e44-837a-49a6-9930-2ec3e1a9705c

nischal-shetty2 commented 7 months ago

already fixed by #172