Spaces:
Build error
Build error
import pygame | |
from pygame.locals import * | |
# Initialize Pygame | |
pygame.init() | |
# Load the Talking Tom face image | |
face_model = pygame.image.load('pictures/talking_tom_face.png') | |
# Create a display surface | |
screen = pygame.display.set_mode((640, 480), 0, 32) | |
# Main game loop | |
running = True | |
while running: | |
# Handle events | |
for event in pygame.event.get(): | |
if event.type == QUIT: | |
running = False | |
# --- Drawing Logic --- | |
# Clear the screen (fill with a background color) | |
screen.fill((255, 255, 255)) # Example: Fill with white | |
# Draw the Talking Tom's face | |
screen.blit(face_model, (100, 100)) | |
# --- End Drawing Logic --- | |
# Update the display | |
pygame.display.flip() | |
# Quit Pygame | |
pygame.quit() |