Answers for "why does my pygame window open and close right away?"

3

how to make it so the pygame window will close

running = True
while running:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      running = False
    if running == False:
      pygame.quit()
Posted by: Guest on December-21-2019
0

my pygame window wont stay open

running = True
while running:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      running = False
Posted by: Guest on February-10-2021

Code answers related to "why does my pygame window open and close right away?"

Python Answers by Framework

Browse Popular Code Answers by Language