Closed Starlight-30036225 closed 9 months ago
Inside the mouse input handler I am checking if a move is valid, then sending the piece and the move to the server.
This function currently has no respect for which players turn it is, as that's a whole other system yet to be implemented.
Here I am accepting the string sent by the client, splitting it into its 4 relevant components and checking if the move is valid.
As the back end for moving pieces isnt done, for now it will just print out "Success"
Looks good, now to work on the back end in a new issue
So far no pieces can actually move, the possible moves a piece can make are calculated and sent, but actual moves are not yet possible. For this I need the server class to accept move packets, then return the new board if the move was successful. I will add some checks on both sides to make sure the move is allowed.