mirror of
https://github.com/peterosterlund2/droidfish.git
synced 2025-12-14 18:02:43 +01:00
CuckooChess: Back-ported Texel improvements to CuckooChess. +24 ELO against previous version after 1894 games at 60/6 time control.
This commit is contained in:
@@ -529,22 +529,8 @@ public class Position {
|
||||
*/
|
||||
public final void makeSEEMove(Move move, UndoInfo ui) {
|
||||
ui.capturedPiece = squares[move.to];
|
||||
boolean wtm = whiteMove;
|
||||
|
||||
int p = squares[move.from];
|
||||
long fromMask = 1L << move.from;
|
||||
|
||||
// Handle castling
|
||||
if (((pieceTypeBB[Piece.WKING] | pieceTypeBB[Piece.BKING]) & fromMask) != 0) {
|
||||
int k0 = move.from;
|
||||
if (move.to == k0 + 2) { // O-O
|
||||
setSEEPiece(k0 + 1, squares[k0 + 3]);
|
||||
setSEEPiece(k0 + 3, Piece.EMPTY);
|
||||
} else if (move.to == k0 - 2) { // O-O-O
|
||||
setSEEPiece(k0 - 1, squares[k0 - 4]);
|
||||
setSEEPiece(k0 - 4, Piece.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle en passant
|
||||
if (move.to == epSquare) {
|
||||
@@ -558,7 +544,7 @@ public class Position {
|
||||
// Perform move
|
||||
setSEEPiece(move.from, Piece.EMPTY);
|
||||
setSEEPiece(move.to, p);
|
||||
whiteMove = !wtm;
|
||||
whiteMove = !whiteMove;
|
||||
}
|
||||
|
||||
public final void unMakeSEEMove(Move move, UndoInfo ui) {
|
||||
@@ -566,20 +552,6 @@ public class Position {
|
||||
int p = squares[move.to];
|
||||
setSEEPiece(move.from, p);
|
||||
setSEEPiece(move.to, ui.capturedPiece);
|
||||
boolean wtm = whiteMove;
|
||||
|
||||
// Handle castling
|
||||
int king = wtm ? Piece.WKING : Piece.BKING;
|
||||
if (p == king) {
|
||||
int k0 = move.from;
|
||||
if (move.to == k0 + 2) { // O-O
|
||||
setSEEPiece(k0 + 3, squares[k0 + 1]);
|
||||
setSEEPiece(k0 + 1, Piece.EMPTY);
|
||||
} else if (move.to == k0 - 2) { // O-O-O
|
||||
setSEEPiece(k0 - 4, squares[k0 - 1]);
|
||||
setSEEPiece(k0 - 1, Piece.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
// Handle en passant
|
||||
if (move.to == epSquare) {
|
||||
|
||||
Reference in New Issue
Block a user