X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fposition.cpp;h=0449222e016406f5e2e63804e8f695e5771cf28c;hp=69a756d9ce9b0b68ab0eecce7758a4ced1e05401;hb=0c1f119069bf915b85126159d4865c4bcc532239;hpb=e06a117d5e78ec4edc051f2b161d36559f784d37 diff --git a/src/position.cpp b/src/position.cpp index 69a756d9..0449222e 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -52,6 +52,9 @@ namespace { const string PieceToChar(" PNBRQK pnbrqk"); +const Piece Pieces[] = { W_PAWN, W_KNIGHT, W_BISHOP, W_ROOK, W_QUEEN, W_KING, + B_PAWN, B_KNIGHT, B_BISHOP, B_ROOK, B_QUEEN, B_KING }; + // min_attacker() is a helper function used by see_ge() to locate the least // valuable attacker for the side to move, remove the attacker we just found // from the bitboards and scan for new X-ray attacks behind it. @@ -62,7 +65,7 @@ PieceType min_attacker(const Bitboard* bb, Square to, Bitboard stmAttackers, Bitboard b = stmAttackers & bb[Pt]; if (!b) - return min_attacker(bb, to, stmAttackers, occupied, attackers); + return min_attacker(bb, to, stmAttackers, occupied, attackers); occupied ^= b & ~(b - 1);