bugfix/click-to-move
The bug was, when clicked on a piece, and afterwards an empty square, the possible options for the piece was still showing. But when you clicked on a possible square, nothing was happening.
I fixed it by removing the options that were being shown after clicking on an invalid square.
Also, before, when you clicked on a piece without any possible moves, it wasn't showing anything on the board. But now, even though the piece has no possible moves, it highlights the piece. I thought it would be more inituitive.
I also wanted to not show anything when clicked on an enemy piece but i thought that would be an overkill and out of subject of the example so i didn't.
Thanks <3
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| react-chessboard | ✅ Ready (Inspect) | Visit Preview | Jul 23, 2022 at 5:16PM (UTC) |