Код: Выделить всё
if (this.internalBoard.zobristKey == 501527105403365639L && this.internalBoard.ply == 8 && alpha == 670 && beta == 680) {
System.out.println("Ill-formed node!");
}
if (checkTime()) {
return alpha;
}
final int alphaOrig = alpha;
Код: Выделить всё
public long makeMove(final long fromBB, final long toBB, final int pt) {
this.zobristHistory[this.ply++] = this.zobristKey;
final int fromSq = Long.numberOfTrailingZeros(fromBB);
final int toSq = Long.numberOfTrailingZeros(toBB);
int capturedPieceTy = PT_NONE;
long targetBB = toBB;
if (pt == PT_PAWN && this.isWhiteTurn && targetBB == this.ePSqBB) {
targetBB = targetBB >>> 8;
}
else if (pt == PT_PAWN && !this.isWhiteTurn && targetBB == this.ePSqBB) {
targetBB = targetBB >> 8);
}
else {
removeCapturedPiece(toBB);
}
if ((fromBB & RANK_2) != 0L && (toBB == (fromBB 16))) {
this.ePSqBB = fromBB >>> 8;
}
}
break;
case PT_ROOK:
if (this.isWhiteTurn) {
this.whiteRooksBB = (this.whiteRooksBB & ~fromBB) | toBB;
if ((fromBB & 1L) != 0L) {
this.whiteCanLongCastle = false;
}
if ((fromBB & (1L > 18) & 1L) != 0;
this.blackCanShortCastle = ((state >>> 19) & 1L) != 0;
this.blackCanLongCastle = ((state >>> 20) & 1L) != 0;
final int epSq = (int) ((state >>> 21) & 0x3F);
final int capturedPt = (int) ((state >>> 27) & 0x0F);
final int capturedPieceSq = (int) ((state >>> 32) & 0x3F);
this.halfMoveClock = (int) ((state >>> 38) & 0xFF);
this.ePSqBB = (epSq != 0) ? (1L
Подробнее здесь: [url]https://stackoverflow.com/questions/79657791/zobrist-key-mismatch-after-implementing-lva-mvv-move-ordering-in-javafx-chess-en[/url]