ZSAInfProject / PozaziemscyZaborcy

Space Invaders clone
3 stars 0 forks source link

Game and MainGame - a bit redundant? #6

Open Bravo555 opened 6 years ago

Bravo555 commented 6 years ago

https://github.com/ZSAInfProject/PozaziemscyZaborcy/blob/428434b3deedf721c6226212442a799babe1070c/main_game.py#L5

https://github.com/ZSAInfProject/PozaziemscyZaborcy/blob/428434b3deedf721c6226212442a799babe1070c/main.py#L6

As you can see, you initialize pygame two times. But it isn't the only issue.

In main_game.py you have a bunch (rather, a fucking ton) of references to Game object and implement all the methods there.

I can see that this decoupling of structure/behaviour is used in C++. But this isn't C++.

What you need to do

IMHO just move all the methods to game.py where they belong and instantiate Game object in main.py.

If you have any questions, feel free to ask.

molendzik commented 6 years ago

we we pal gume spoko jest