import pygame import sys
pygame.init()
WIDTH, HEIGHT = 800, 600 FPS = 60 WHITE = (255, 255, 255)
screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption("Clicker Game")
font = pygame.font.Font(None, 36)
score = 0
clock = pygame.time.Clock() running = True while running: # Event handling for event in pygame.event.get(): if event.type == pygame.QUIT: running = False elif event.type == pygame.MOUSEBUTTONDOWN: if event.button == 1: # Left mouse button score += 1
# Update
# Draw
screen.fill(WHITE)
text = font.render(f"Score: {score}", True, (0, 0, 0))
screen.blit(text, (10, 10))
# Refresh screen
pygame.display.flip()
# Cap the frame rate
clock.tick(FPS)
pygame.quit() sys.exit()