1import pygame
2background_colour = (255,255,255)
3(width, height) = (300, 200)
4screen = pygame.display.set_mode((width, height))
5pygame.display.set_caption('Tutorial 1')
6screen.fill(background_colour)
7pygame.display.flip()
8running = True
9while running:
10 for event in pygame.event.get():
11 if event.type == pygame.QUIT:
12 running = False
1import pygame
2
3# The background color can be whatever you want
4background_colour = (255,255,255)
5(width, height) = (300, 200)
6screen = pygame.display.set_mode((width, height))
7pygame.display.set_caption('Tutorial 1')
8screen.fill(background_colour)
9pygame.display.flip()
10running = True
11while running:
12 for event in pygame.event.get():
13 if event.type == pygame.QUIT:
14 running = False