- case WP: return white_pawn_attacks_square(f, t);
- case BP: return black_pawn_attacks_square(f, t);
- case WN: case BN: return knight_attacks_square(f, t);
- case WB: case BB: return bishop_attacks_square(f, t);
- case WR: case BR: return rook_attacks_square(f, t);
- case WQ: case BQ: return queen_attacks_square(f, t);
- case WK: case BK: return king_attacks_square(f, t);
+ case WP: return pawn_attacks_square(WHITE, f, t);
+ case BP: return pawn_attacks_square(BLACK, f, t);
+ case WN: case BN: return piece_attacks_square<KNIGHT>(f, t);
+ case WB: case BB: return piece_attacks_square<BISHOP>(f, t);
+ case WR: case BR: return piece_attacks_square<ROOK>(f, t);
+ case WQ: case BQ: return piece_attacks_square<QUEEN>(f, t);
+ case WK: case BK: return piece_attacks_square<KING>(f, t);