- return StepAttacksBB[Piece][s];
-}
-
-template<>
-inline Bitboard Position::attacks_from<BISHOP>(Square s) const {
- return bishop_attacks_bb(s, occupied_squares());
+ return Pt == BISHOP ? bishop_attacks_bb(s, occupied_squares())
+ : Pt == ROOK ? rook_attacks_bb(s, occupied_squares())
+ : Pt == QUEEN ? attacks_from<ROOK>(s) | attacks_from<BISHOP>(s)
+ : StepAttacksBB[Pt][s];