From 41459d9b789468af7e38ff34a9b22bda227d6a34 Mon Sep 17 00:00:00 2001 From: lockeshor Date: Thu, 8 Oct 2026 20:21:10 -0400 Subject: [PATCH] AI: add esc to exit --- main.py | 3 +++ 1 file changed, 3 insertions(+) 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