mtkp/432-final-project

Exiting game.py

Closed this issue · 1 comments

mtkp commented

We should be able to exit at any time by clicking the close window button. Right now it only works after connecting to the server so we should figure out a way to reorganize the code so everything is inside a loop that checks for this (I think this is what enables it):

for event in pygame.event.get():
    if event.type == pygame.QUIT:
        done = True
mtkp commented

Seems there's still issues with this. Game exits but pygame has an error. This seems due to the fact that pygame.quit() doesn't actually terminate the program.... http://stackoverflow.com/questions/1997710/pygame-error-display-surface-quit-why