Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi init bug #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Multi init bug #10

wants to merge 2 commits into from

Conversation

otzen
Copy link

@otzen otzen commented Dec 5, 2021

There was a bug that caused the process to hang.
see #11

Solution: I moved the initialization of the non-primitive types inside an init function, including this call to pygame,init(). So now the pygame.init() is only called when this function is explicitly called. Also added the call to this init() to ironSeed.py.

Note: I had to inject the h.IronSeedTime object through this call to, as calling it directly from within globals would not work as it would create a circular import loop.

@nuke Bloodaxe if you don't like the pyCharm ide just leave out the .idea folder in the pull request merge.

Also I added a name == 'main' pattern so the game can be started by just calling ironSeed.py

Martin Otzen added 2 commits December 5, 2021 03:05
There was a bug htat caused the process to hang, I narrowed it down to the pygame.init being called multiply tims.
@nuke Bloodaxe if you don't like the pyCharm ide just leave out the .idea folder in the pull request merge.

removing format changes
@otzen otzen marked this pull request as ready for review December 5, 2021 02:58
@otzen otzen mentioned this pull request Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant