Answers for "how to exit pygame"

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
1

pygame quit

for event in pygame.event.get():
  if event.type == pygame.QUIT:
    pygame.quit()
Posted by: Guest on July-08-2021
0

exit a pygame program

running = Truewhile running:  for event in pygame.event.get():    if event.type == pygame.QUIT:      running = False
Posted by: Guest on May-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language