- // Attack information for a given square
- Bitboard attacks_to(Square s) const;
- Bitboard attacks_to(Square s, Color c) const;
- bool pawn_attacks_square(Color c, Square f, Square t) const;
- Bitboard pawn_attacks(Color c, Square s) const;
-
- template<PieceType>
- Bitboard piece_attacks(Square s) const;
-
- template<PieceType>
- Bitboard piece_attacks_square(Square f, Square t) const; // Dispatch at compile-time
-
- bool piece_attacks_square(Piece p, Square f, Square t) const; // Dispatch at run-time
+ // Information about attacks to or from a given square
+ Bitboard attackers_to(Square s) const;
+ Bitboard attacks_from(Piece p, Square s) const;
+ static Bitboard attacks_from(Piece p, Square s, Bitboard occ);
+ template<PieceType> Bitboard attacks_from(Square s) const;
+ template<PieceType> Bitboard attacks_from(Square s, Color c) const;