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