Ask coding questions

← Back to all posts
why self.ship = Ship(self) takes self as the argument???
EDHENATION (2)

I don't really understand the explanation from my guide book

Comments
hotnewtop
Coder100 (16760)

as you can see in the constructor, the code takes in an argument, ai_game. This argument is aka AlienInvasion, which you can access by doing self (it gives you the current class)