Fix blocking checkmate

main
Elnu 2 years ago
parent e178d88742
commit 5e1553aaf6

@ -227,13 +227,10 @@ public class Board {
if (inCheck) {
isGameOver = true;
for (Move move : getAllLegalMoves(!movedPiece.black)) {
move(move);
if (!oppositeKing.isInCheck(move, this)) {
isGameOver = false;
undoMove();
break;
}
undoMove();
}
} else if (getAllLegalMoves(movedPiece.black).isEmpty()) {
isGameOver = true;