Ask coding questions

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

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

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)