/// Position::set() is an overload to initialize the position object with
-/// the given endgame code string like "KBPKN". It is manily an helper to
+/// the given endgame code string like "KBPKN". It is mainly a helper to
/// get the material key out of an endgame code. Position is not playable,
/// indeed is even not guaranteed to be legal.
// Update pawn hash key and prefetch access to pawnsTable
st->pawnKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
- prefetch(thisThread->pawnsTable[st->pawnKey]);
+ prefetch2(thisThread->pawnsTable[st->pawnKey]);
// Reset rule 50 draw counter
st->rule50 = 0;
}
if (step == Lists)
+ {
for (Piece pc : Pieces)
{
if (pieceCount[pc] != popcount(pieces(color_of(pc), type_of(pc))))
if (board[pieceList[pc][i]] != pc || index[pieceList[pc][i]] != i)
return false;
}
+ if (pieceCount[PAWN] > FILE_NB)
+ return false;
+ }
if (step == Castling)
for (Color c = WHITE; c <= BLACK; ++c)