It needs to be a sequence such as a tuple is what most people use
Also make sure you add a clause to close for the little X on the windows via pygame.QUIT. And its better to loop events and close on such events, as well as put your screen fill and screen updates in the main game loop to update. An example below...
screen = pygame.display.set_mode((640, 480))https://www.pygame.org/docs/ref/display.html#pygame.display.set_mode
Also make sure you add a clause to close for the little X on the windows via pygame.QUIT. And its better to loop events and close on such events, as well as put your screen fill and screen updates in the main game loop to update. An example below...
import pygame screen = pygame.display.set_mode((800,600)) done = False while not done: for event in pygame.event.get(): if event.type == pygame.QUIT: done = True elif event.type == pygame.KEYDOWN: if event.key == pygame.K_ESCAPE: done = True screen.fill((255,255,255)) pygame.display.update()
Recommended Tutorials: