When I run this code:
def showStartScreen(self):
titleFont = pygame.font.Font("freesansbold.ttf", 100)
titleSurf1 = titleFont.render("Pong!", True, WHITE, LIGHT_BLUE)
titleSurf2 = titleFont.render("Pong!", True, LAVENDER)
degrees1 = 0
degrees2 = 0
while True:
DISPLAYSURF.fill(WHITE)
rotatedSurf1 = pygame.transform.rotate(titleSurf1, degrees1)
rotatedRect1 = rotatedSurf1.get_rect()
rotatedRect1.center = (WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2)
DISPLAYSURF.blit(rotatedSurf1, rotatedRect1)
rotatedSurf2 = pygame.transform.rotate(titleSurf2, degrees2)
rotatedRect2 = rotatedSurf2.get_rect()
rotatedRect2.center = (WINDOW_WIDTH / 2, WINDOW_HEIGHT / 2)
DISPLAYSURF.blit(rotatedSurf2, rotatedRect2)
I get the error message:
DISPLAYSURF.fill(WHITE) pygame.error: display Surface quit