- 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);
+ case WP: return pawn_attacks(s, WHITE);
+ case BP: return pawn_attacks(s, BLACK);
+ case WN: case BN: return piece_attacks<KNIGHT>(s);
+ case WB: case BB: return piece_attacks<BISHOP>(s);
+ case WR: case BR: return piece_attacks<ROOK>(s);
+ case WQ: case BQ: return piece_attacks<QUEEN>(s);
+ case WK: case BK: return piece_attacks<KING>(s);