I am trying to make a chess game in react.js using the libraries chess.js and chessboard.jsx
Currently i am trying to implement move validation with the following cod