attackUnits = Min(99, Max(0, attackUnits));
// Finally, extract the king danger score from the KingDangerTable[]
attackUnits = Min(99, Max(0, attackUnits));
// Finally, extract the king danger score from the KingDangerTable[]
// value that will be used for pruning because this value can sometimes
// be very big, and so capturing a single attacking piece can therefore
// result in a score change far bigger than the value of the captured piece.
ei.value -= Sign[Us] * KingDangerTable[Us][attackUnits];
// value that will be used for pruning because this value can sometimes
// be very big, and so capturing a single attacking piece can therefore
// result in a score change far bigger than the value of the captured piece.
ei.value -= Sign[Us] * KingDangerTable[Us][attackUnits];
Bitboard squaresToQueen, defendedSquares, unsafeSquares, supportingPawns;
Bitboard b = ei.pi->passed_pawns(Us);
Bitboard squaresToQueen, defendedSquares, unsafeSquares, supportingPawns;
Bitboard b = ei.pi->passed_pawns(Us);
Square s = pop_1st_bit(&b);
assert(pos.pawn_is_passed(Us, s));
Square s = pop_1st_bit(&b);
assert(pos.pawn_is_passed(Us, s));