Professional Documents
Culture Documents
p6
p6
import pygame
import random
# Initialize Pygame
pygame.init()
# Define colors
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
# Main loop
running = True
clock = pygame.time.Cloc()k
while running:
# Handle events
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False
# Quit Pygame
pygame.quit()