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];