From bda1dc48352295dd0dcd1acb821e5d6091f94a7e Mon Sep 17 00:00:00 2001 From: Steve Clement Date: Sat, 30 Aug 2014 22:42:20 +0200 Subject: [PATCH] - graceful exit --- game.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game.py b/game.py index 9c9ca42..208a941 100755 --- a/game.py +++ b/game.py @@ -3,7 +3,7 @@ Avocados and stuff """ -import os, random +import os, random, sys import pygame import avocado, lawyer from pygame.locals import * @@ -125,6 +125,8 @@ class TheGame: # Had enough of this? if event.type == pygame.QUIT: running = False + pygame.quit() + sys.exit() pygame.display.flip()