react-chessboard icon indicating copy to clipboard operation
react-chessboard copied to clipboard

bugfix/click-to-move

Open zekicaneksi opened this issue 3 years ago • 1 comments

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

zekicaneksi avatar Jul 23 '22 17:07 zekicaneksi

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)

vercel[bot] avatar Jul 23 '22 17:07 vercel[bot]