AI: add esc to exit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user