last modification
This commit is contained in:
parent
03c3c5998b
commit
cea28903d7
|
|
@ -76,8 +76,6 @@ public class AutoPlayer {
|
||||||
// Check if move results in checkmate for the opponent
|
// Check if move results in checkmate for the opponent
|
||||||
if (copy.isCheckmate(!isWhite)) {
|
if (copy.isCheckmate(!isWhite)) {
|
||||||
System.out.println("Checkmate! AutoPlayer has won.");
|
System.out.println("Checkmate! AutoPlayer has won.");
|
||||||
// Optionally, return this move instead of null:
|
|
||||||
// return move;
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -114,7 +112,7 @@ public class AutoPlayer {
|
||||||
return bestMoves.get(idx);
|
return bestMoves.get(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call this after a human move to reset tracking
|
// Call this after a player move to reset tracking
|
||||||
public void resetLastMovedPiece() {
|
public void resetLastMovedPiece() {
|
||||||
lastMovedPieceHash = null;
|
lastMovedPieceHash = null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue