// Prepare the cuckoo tables
std::memset(cuckoo, 0, sizeof(cuckoo));
std::memset(cuckooMove, 0, sizeof(cuckooMove));
- int count = 0;
+ [[maybe_unused]] int count = 0;
for (Piece pc : Pieces)
for (Square s1 = SQ_A1; s1 <= SQ_H8; ++s1)
for (Square s2 = Square(s1 + 1); s2 <= SQ_H8; ++s2)
if (captured)
k ^= Zobrist::psq[captured][to];
- return k ^ Zobrist::psq[pc][to] ^ Zobrist::psq[pc][from];
+ k ^= Zobrist::psq[pc][to] ^ Zobrist::psq[pc][from];
+
+ return (captured || type_of(pc) == PAWN)
+ ? k : adjust_key50<true>(k);
}
// Don't allow pinned pieces to attack as long as there are
// pinners on their original square.
if (pinners(~stm) & occupied)
+ {
stmAttackers &= ~blockers_for_king(stm);
- if (!stmAttackers)
- break;
+ if (!stmAttackers)
+ break;
+ }
res ^= 1;