- return InFrontBB[c][square_rank(s)];
-}
-
-
-/// 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 RAttacks[m.offset + (((occ & m.mask) * m.mult) >> m.shift)];
-}
-
-inline Bitboard bishop_attacks_bb(Square s, Bitboard occ) {
- const Magics& m = BMagics[s];
- return BAttacks[m.offset + (((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 RAttacks[m.offset +
- ((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 BAttacks[m.offset +
- ((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);