This commit is contained in:
Juliette 2025-05-21 22:22:17 +02:00
parent bf169743bf
commit 0013c62fe9
2 changed files with 4 additions and 4 deletions

View File

@ -170,7 +170,7 @@ public class Board {
selectedY = y;
highlight.clear();
highlight.addAll(findCastlingMoves(p)); //the NEW UPDATED ONE for CASTLING
highlight.addAll(findMovesAndCastlingMoves(p)); //the NEW UPDATED ONE for CASTLING
} else {
selectedX = -1;
selectedY = -1;
@ -356,7 +356,7 @@ public class Board {
return moves;
}
public ArrayList<Position> findCastlingMoves(Piece p) {
public ArrayList<Position> findMovesAndCastlingMoves(Piece p) {
ArrayList<Position> moves = findMoves(p); //all the basic moves

View File

@ -1,6 +1,6 @@
package backend;
public class chessRulesCheck {
public class ChessRulesCheck {
//The basic rules needed for CASTLING!!!!!!!!! useful for the rest of course ;)
@ -17,7 +17,7 @@ public class chessRulesCheck {
return false;
}
public boolean isGoingToBeThreatenedIfItGoesThere (Board board, Piece piece, int toX, int toY ) {
public boolean isGoingToBeThreatenedIfItGoesThere (Board board, Piece piece, int toX, int toY ) { // I know the name sucks...;
int fromX = piece.getX();
int fromY = piece.getY();