"I have never played tennis."
Translation:Nigdy nie grałem w tenisa.
It's a relatively recent tendency that inanimate masculine nouns become grammatically animate. So, you can say that this development is still in progress. This is why the rules are very inconsistent. Tenis can be inanimate in sentences like "Oglądam tenis", but then it suddenly becomes animate if you say "gram w tenisa".
Let's focus on the "grać w [noun]" construction. Here I can say the following:
- Card games (poker, bridż, skat...) - definitely animate
- Golf - definitely animate
- Hokej - definitely animate
- Bilard - predominantly inanimate, corpus ratio 49:4
- Futbol - definitely inanimate.
As you can see, it's impossible to predict which sport will take which case. Thankfully, many popular sports (koszykówka, siatkówka, piłka nożna...) are feminine, so you won't always have to worry about that.