I have made some changes to the chessboard component that I would like to submit in this pull request. Firstly, I have added an undo function that allows the user to undo a made move.
Secondly, I have centered the promotion dialogue in the middle of the chessboard component. This makes it easier for the user to see the options available to them when promoting a pawn.
Thirdly, I fixed an issue with castling not working properly. This was caused by the onSelectPiece function not handling the special notation that castling uses. I have updated the function to handle this properly so that castling now works as expected.
Lastly, I noticed an issue where the user is unable to promote twice. If they try to promote a second time, the dialogue showing the piece options simply does not show up and the pawn is stuck on the 8th/1st rank without the user being able to move any other pieces. I'm hoping you will have a solution for this issue.
Hi there!
I have made some changes to the chessboard component that I would like to submit in this pull request. Firstly, I have added an undo function that allows the user to undo a made move.
Secondly, I have centered the promotion dialogue in the middle of the chessboard component. This makes it easier for the user to see the options available to them when promoting a pawn.
Thirdly, I fixed an issue with castling not working properly. This was caused by the onSelectPiece function not handling the special notation that castling uses. I have updated the function to handle this properly so that castling now works as expected.
Lastly, I noticed an issue where the user is unable to promote twice. If they try to promote a second time, the dialogue showing the piece options simply does not show up and the pawn is stuck on the 8th/1st rank without the user being able to move any other pieces. I'm hoping you will have a solution for this issue.
Thank you for considering my pull request!