+inline Bitboard attacks_bb(Piece pc, Square s, Bitboard occ) {
+
+ switch (type_of(pc))
+ {
+ case BISHOP: return attacks_bb<BISHOP>(s, occ);
+ case ROOK : return attacks_bb<ROOK>(s, occ);
+ case QUEEN : return attacks_bb<BISHOP>(s, occ) | attacks_bb<ROOK>(s, occ);
+ default : return StepAttacksBB[pc][s];
+ }
+}