When a user clicks on the flip board function, the pieces aren't getting flipped, The clicks are rotated by 90 degrees.
The button intents to flip the board for the user so that he can rotate the board by 90 degrees and can change the side AI is playing to experience what AI could do in the situation of the human player.
Possible Fix:
A fix to this issue could be to reset the board and reprint the pieces according to the location before resetting the pieces.
To Reproduce
Steps to reproduce the behaviour:
- Go here or Clone the repository and run it on the live server or open index.html file
- Click on the Flip Board button on the website.
- See an error on moving the pieces.
Expected behaviour
The button intents to flip the board for the user so that he can rotate the board by 90 degrees.
Screenshots
After clicking the square on selecting the e2 square, the d2 square gets selected.
![chess](https://user-images.githubusercontent.com/52123364/103209953-5517a880-492a-11eb-9856-035389c5fce8.png)
Desktop (please complete the following information):
- OS: Windows 10
- Browser Chrome
- Version 87.0.4280.88
Additional context
A fix to this issue could be to reset the board and reprint the pieces according to the location before resetting the pieces.