Fixed movement on a pieces and user input

main
Brett 2022-12-19 22:29:04 -05:00
parent 5aba3bb6c8
commit 22797be579
1 changed files with 4 additions and 3 deletions

View File

@ -54,9 +54,10 @@ public class King extends ChessPiece {
private void castleRight(){
// casting has to move the rook on the right size of the king from white's perspective
if (this.isWhite) {
b.set(b.size() - 3, 0, b.get(b.size() - 1, 0));
} else
if (this.isWhite)
b.movePiece(b.size() - 1, 0, b.size() - 3, 0);
else
b.movePiece(b.size()-1, b.size()-1, b.size()-3, b.size()-1)
b.set(b.size()-3, b.size()-1, b.get(b.size()-1, b.size()-1));
}