import pygame # Homework: increase the score by 1 each time the player clicks. # Display the current score on screen at all times. # Clicking anywhere on the window counts as a point. pygame.init() screen = pygame.display.set_mode((640, 480)) pygame.display.set_caption("Click Score") clock = pygame.time.Clock() BG = (15, 30, 50) WHITE = (255, 255, 255) font = pygame.font.SysFont(None, 56) score = 0 running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False # TODO: detect a mouse click and add 1 to score screen.fill(BG) # TODO: render f"Score: {score}" and blit it centered or top-left pygame.display.flip() clock.tick(60) pygame.quit()