-inline Bitboard Position::attacks_from(Piece pc, Square s) const {
- return attacks_bb(pc, s, byTypeBB[ALL_PIECES]);
+inline Bitboard Position::attacks_from(PieceType pt, Square s) const {
+ return attacks_bb(pt, s, byTypeBB[ALL_PIECES]);
+}
+
+template<Color c>
+inline Bitboard Position::pawn_attacks(Bitboard b) const {
+ return c == WHITE ? shift<NORTH_WEST>(b) | shift<NORTH_EAST>(b)
+ : shift<SOUTH_WEST>(b) | shift<SOUTH_EAST>(b);