Debuged the function getall legal move as the X and Y was swapped.

This commit is contained in:
yohanmontagne 2025-05-15 16:31:12 +02:00
parent c363bf7c1b
commit 34b0a251c2
4 changed files with 1 additions and 1 deletions

BIN
.DS_Store vendored

Binary file not shown.

BIN
OOP_2B1_Project/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -368,7 +368,7 @@ public class Board implements Cloneable {
for (Piece piece : pieces) {
if (piece.isWhite() == isWhite) {
moves.addAll(piece.getLegalMoves(this, piece.getX(), piece.getY()));
moves.addAll(piece.getLegalMoves(this, piece.getY(), piece.getX()));
}
}