Skip to content

Commit

Permalink
Bench: 25394064
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Feb 4, 2025
1 parent e3bf1e5 commit 29b2e63
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static Key GenMinorKey(const Position *pos) {
Key key = 0;

for (Square sq = A1; sq <= H8; ++sq)
if (PieceTypeOf(pieceOn(sq)) == KNIGHT || PieceTypeOf(pieceOn(sq)) == BISHOP || PieceTypeOf(pieceOn(sq)) == KING)
if (PieceTypeOf(pieceOn(sq)) == KNIGHT || PieceTypeOf(pieceOn(sq)) == BISHOP)
key ^= PieceKeys[pieceOn(sq)][sq];

return key;
Expand All @@ -144,7 +144,7 @@ static Key GenMajorKey(const Position *pos) {
Key key = 0;

for (Square sq = A1; sq <= H8; ++sq)
if (PieceTypeOf(pieceOn(sq)) == ROOK || PieceTypeOf(pieceOn(sq)) == QUEEN || PieceTypeOf(pieceOn(sq)) == KING)
if (PieceTypeOf(pieceOn(sq)) == ROOK || PieceTypeOf(pieceOn(sq)) == QUEEN)
key ^= PieceKeys[pieceOn(sq)][sq];

return key;
Expand Down
6 changes: 0 additions & 6 deletions src/makemove.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ static void ClearPiece(Position *pos, const Square sq, const bool hash) {
pos->nonPawnKey[color] ^= PieceKeys[piece][sq];

if (pt == KING) {
pos->minorKey ^= PieceKeys[piece][sq];
pos->majorKey ^= PieceKeys[piece][sq];
} else if (pt >= ROOK)
pos->majorKey ^= PieceKeys[piece][sq];
else
Expand Down Expand Up @@ -97,8 +95,6 @@ static void AddPiece(Position *pos, const Square sq, const Piece piece, const bo
pos->nonPawnKey[color] ^= PieceKeys[piece][sq];

if (pt == KING) {
pos->minorKey ^= PieceKeys[piece][sq];
pos->majorKey ^= PieceKeys[piece][sq];
} else if (pt >= ROOK)
pos->majorKey ^= PieceKeys[piece][sq];
else
Expand Down Expand Up @@ -145,8 +141,6 @@ static void MovePiece(Position *pos, const Square from, const Square to, const b
pos->nonPawnKey[color] ^= PieceKeys[piece][from] ^ PieceKeys[piece][to];

if (pt == KING) {
pos->minorKey ^= PieceKeys[piece][from] ^ PieceKeys[piece][to];
pos->majorKey ^= PieceKeys[piece][from] ^ PieceKeys[piece][to];
} else if (pt >= ROOK)
pos->majorKey ^= PieceKeys[piece][from] ^ PieceKeys[piece][to];
else
Expand Down

0 comments on commit 29b2e63

Please sign in to comment.