Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KensoDev/4d9e7ee19964869fea61e4d45251032b to your computer and use it in GitHub Desktop.
Save KensoDev/4d9e7ee19964869fea61e4d45251032b to your computer and use it in GitHub Desktop.
This doesn't
#!/usr/bin/python3
import pygame
import sys
class Game():
def __init__(self):
self._running = True
def launch(self):
pygame.init()
pygame.display.set_mode((640, 480))
self.check_exit_game()
def check_exit_game(self):
while self._running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
self._running = False
pygame.display.quit()
pygame.quit()
sys.exit()
if __name__ == "__main__":
game = Game()
game.launch()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment