Created
July 11, 2017 21:12
-
-
Save faradaym/d8c660f042850f4359af5921790e6a31 to your computer and use it in GitHub Desktop.
Yay!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import pygame | |
import sys | |
running = True | |
def launch(): | |
pygame.init() | |
pygame.display.set_mode((640, 480)) | |
exit_game() | |
def exit_game(): | |
global running | |
while running: | |
for event in pygame.event.get(): | |
if event.type == pygame.QUIT: | |
running = False | |
pygame.display.quit() | |
pygame.quit() | |
sys.exit() | |
launch() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment