Skip to content

Instantly share code, notes, and snippets.

@quapka
Created October 26, 2014 14:18
Show Gist options
  • Save quapka/b65719510965b9cec0d9 to your computer and use it in GitHub Desktop.
Save quapka/b65719510965b9cec0d9 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import pygame
import sys
class Matches(object):
def __init__(self):
self.current_screen = 'main_menu_screen'
def run(self):
# initialize pygame
pygame.init()
# set screen resolution
self.screen = pygame.display.set_mode((640,480))
pygame.display.set_caption('Nim Matches')
# start with main menu
while True:
for event in pygame.event.get():
# quit the game and exit
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
pygame.draw.rect(self.screen,
(255,255,255),
(0,0,200,100),
0)
if __name__ == '__main__':
Matches().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment