réparation

This commit is contained in:
Romain MURPHY 2025-05-07 13:11:13 +02:00
parent f66e6c7860
commit 92ab88893e
1 changed files with 6 additions and 6 deletions

View File

@ -240,12 +240,12 @@ public class Board {
public boolean isCheck(int x, int y) { public boolean isCheck(int x, int y) {
boolean out = false; boolean out = false;
if (board.get(x).get(y) != null) { if (board.get(y).get(x) != null) {
if (board.get(y).get(x).getType() == PieceType.King && board.get(y).get(x).isWhite == turnColor){ if (board.get(y).get(x).getType() == PieceType.King && board.get(y).get(x).isWhite == turnColor){
if (kingCheck.isKingInCheck(board,turnColor)) { if (kingCheck.isKingInCheck(board,turnColor)) {
out = true; out = true;
} }
} }
} }
return out; return out;
} }