Open Bravo555 opened 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.
main_game.py
Game
I can see that this decoupling of structure/behaviour is used in C++. But this isn't C++.
IMHO just move all the methods to game.py where they belong and instantiate Game object in main.py.
game.py
main.py
If you have any questions, feel free to ask.
we we pal gume spoko jest
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 toGame
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 instantiateGame
object inmain.py
.If you have any questions, feel free to ask.