// Knight promotion is the only promotion that can give a direct check
// that's not already included in the queen promotion.
// Knight promotion is the only promotion that can give a direct check
// that's not already included in the queen promotion.
*moveList++ = make<PROMOTION>(to - D, to, KNIGHT);
else
(void)ksq; // Silence a warning under MSVC
*moveList++ = make<PROMOTION>(to - D, to, KNIGHT);
else
(void)ksq; // Silence a warning under MSVC
- b1 &= pos.attacks_from<PAWN>(ksq, Them);
- b2 &= pos.attacks_from<PAWN>(ksq, Them);
+ b1 &= pawn_attacks_bb(Them, ksq);
+ b2 &= pawn_attacks_bb(Them, ksq);
// Add pawn pushes which give discovered check. This is possible only
// if the pawn is not on the same file as the enemy king, because we
// Add pawn pushes which give discovered check. This is possible only
// if the pawn is not on the same file as the enemy king, because we
sliderAttacks |= LineBB[ksq][pop_lsb(&sliders)] & ~pos.checkers();
// Generate evasions for king, capture and non capture moves
sliderAttacks |= LineBB[ksq][pop_lsb(&sliders)] & ~pos.checkers();
// Generate evasions for king, capture and non capture moves