diff --git a/main.py b/main.py index 953c198..46e3a69 100644 --- a/main.py +++ b/main.py @@ -13,6 +13,7 @@ from cmu_graphics import * import json import random import math +import os # ============================================================================= @@ -306,6 +307,8 @@ def onKeyPress(app, key): # DEBUG if key == "m": app.save["cash"] = 1000000 + if key == "escape": + os._exit(0) #suggested by AI, instantly exits without hanging like sys.exit(0) #added by AI, but simply allows me to trigger a breakpoint manually to check state of app and variables #after some debate, this was the best option over something more complex