diff --git a/src/simulators/GameStatesChecker.java b/src/simulators/GameStatesChecker.java index 1c8c633..a470771 100644 --- a/src/simulators/GameStatesChecker.java +++ b/src/simulators/GameStatesChecker.java @@ -38,6 +38,10 @@ private boolean canKingMoveToAdjacentSquares(StandardChessBoard board, Player ki checkReachability: for (Piece piece : board.getPiecesWithColor(opponentColor)) { + if (piece.getLocation().equals(square)) { + continue; + } + for (MoveStrategy moveStrategy : piece.getMovements()) { if (moveStrategy.validateMove(board, piece.getLocation(), square)) { canReachThisSquare = true;