python - why wont pygame quit? -
the game freezes instead of quitting. have exit idle. ideas on do?
def quit_game(): event in pygame.event.get(): if event.type == pygame.quit: sys.exit() quit_game()
this idle bug. recommend using real ide such pycharm. fix issue, have @ pygame faq. offer solution:
# ... running = true while running: event = pygame.event.wait () if event.type == pygame.quit: running = false # idle friendly pygame.quit ()
Comments
Post a Comment