-/// Functions for computing sliding attack bitboards. rook_attacks_bb(),
-/// bishop_attacks_bb() and queen_attacks_bb() all take a square and a
-/// bitboard of occupied squares as input, and return a bitboard representing
-/// all squares attacked by a rook, bishop or queen on the given square.
-
-#if defined(IS_64BIT)
-
-inline Bitboard rook_attacks_bb(Square s, Bitboard occ) {
- const Magics& m = RMagics[s];
- return m.attacks[((occ & m.mask) * m.mult) >> m.shift];
-}
-
-inline Bitboard bishop_attacks_bb(Square s, Bitboard occ) {
- const Magics& m = BMagics[s];
- return m.attacks[((occ & m.mask) * m.mult) >> m.shift];
-}
-
-#else // if !defined(IS_64BIT)
-
-inline Bitboard rook_attacks_bb(Square s, Bitboard occ) {
- const Magics& m = RMagics[s];
- Bitboard b = occ & m.mask;
- return m.attacks[(unsigned(b) * unsigned(m.mult) ^ unsigned(b >> 32) * unsigned(m.mult >> 32)) >> m.shift];
-}
-
-inline Bitboard bishop_attacks_bb(Square s, Bitboard occ) {
- const Magics& m = BMagics[s];
- Bitboard b = occ & m.mask;
- return m.attacks[(unsigned(b) * unsigned(m.mult) ^ unsigned(b >> 32) * unsigned(m.mult >> 32)) >> m.shift];
-}
-
-#endif
-
-inline Bitboard queen_attacks_bb(Square s, Bitboard blockers) {
- return rook_attacks_bb(s, blockers) | bishop_attacks_bb(s, blockers);
-}
-
+/// between_bb returns a bitboard representing all squares between two squares.
+/// For instance, between_bb(SQ_C4, SQ_F7) returns a bitboard with the bits for
+/// square d5 and e6 set. If s1 and s2 are not on the same line, file or diagonal,
+/// 0 is returned.