1import sys
2
3import pygame
4from pygame.locals import *
5
6pygame.init()
7
8fps = 60
9fpsClock = pygame.time.Clock()
10
11width, height = 640, 480
12screen = pygame.display.set_mode((width, height))
13
14# Game loop.
15while True:
16 screen.fill((0, 0, 0))
17
18 for event in pygame.event.get():
19 if event.type == QUIT:
20 pygame.quit()
21 sys.exit()
22
23 # Update.
24
25 # Draw.
26
27 pygame.display.flip()
28 fpsClock.tick(fps)