Skip to content
Advertisement

Pygame black screen crash [closed]

I don’t what happened, it was working few minutes ago, but now it’s not. It’s crashing every time.

JavaScript

I have to fix this in one hour. I read other answers related to this but nothing seems to work.
Just adding details Just adding details Just adding details Just adding details Just adding details Just adding details

Advertisement

Answer

Here You go, fixed the code:

JavaScript

First of about formatting (suggestion according to PEP 8): 1 newline between class method definitions, import like in the code I edited (tho this is acceptable: from module import class, func, etc).

Also I don’t see the point of both .flip() and .update() since they basically do the same.

About Your poblem:

JavaScript

this was Your issue: the while loop

solution: not using it:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement