Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/rlcode/reinforcement-learning
/ quit_if_window_closed
Function
quit_if_window_closed
4-atari-hard/env.py:219–225 ·
view source on GitHub ↗
(env)
Source
from the content-addressed store, hash-verified
217
218
219
def
quit_if_window_closed(env):
220
if
not pygame.display.get_init():
221
return
222
for
event in pygame.event.get():
223
if
event.type == pygame.QUIT:
224
env.close()
225
sys.exit()
226
227
228
def
run_test_loop(env, get_action):
Callers
1
run_test_loop
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected