Starlight-30036225 / ChessTCP

FILLMELATER
0 stars 0 forks source link

Move requests are not being flipped #29

Closed Starlight-30036225 closed 9 months ago

Starlight-30036225 commented 9 months ago

When a player playing as black request to make a move, their move is not being flipped to accommodate the reversed board state.

Starlight-30036225 commented 9 months ago

` String Location = x + "" + y; String PieceLocation = SelectedPiece.getLocation();

            if (possibleMoves.contains(Location)) {   //Checks requested move is possible
                if (!White) {
                    Location = FlipCoords(Location);
                    PieceLocation = FlipCoords(SelectedPiece.getLocation());
                }
                master.requestMove(PieceLocation, Location);
            }`

This fixed it