-inline Bitboard Position::attacks_from<BISHOP>(Square s) const {
- return bishop_attacks_bb(s, occupied_squares());
-}
-
-template<>
-inline Bitboard Position::attacks_from<ROOK>(Square s) const {
- return rook_attacks_bb(s, occupied_squares());
-}
-
-template<>
-inline Bitboard Position::attacks_from<QUEEN>(Square s) const {
- return attacks_from<ROOK>(s) | attacks_from<BISHOP>(s);
+inline Bitboard Position::attacks_from<PAWN>(Square s, Color c) const {
+ return StepAttacksBB[make_piece(c, PAWN)][s];