Home

Published

- 1 min read

how to make it so the pygame window will close

img of how to make it so the pygame window will close

The solution for this is noted below

how to make it so the pygame window will close

Solution

   running = True
while running:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      running = False
    if running == False:
      pygame.quit()

Try other methods by searching on the site. That is if this doesn’t work