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