Drag and drop the pieces If you capture a piece, then you will need to put the captured piece in the Capture button If you want to promote a pawn, then click the promote button and type the colour and the piece and put the pawn in the capture button(that's the only way) and you will need to drag the clone and put it on the promotion square for if you want to promote to a rook ,knight or a bishop, then use the promote button.If you want to promote the pawn to a queen, then take the queen that is on the promote side and put it on the promotion square.
You have to decide whether it’s checkmate or not.If it is checkmate, then drag the checkmated king into the capture button. Do not change the code or the Board. Special Thanks to @khelkud for inspiring me to do this project! Ask For permission to remix my project.