Nikhil0987 commited on
Commit
aedd5aa
·
verified ·
1 Parent(s): bb56464

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -1,11 +1,10 @@
1
  import pygame
2
- from pygame.locals import *
3
- import os
4
 
5
  # Initialize Pygame
6
  pygame.init()
7
 
8
- # Load the 3D model of Talking Tom's face
9
  face_model = pygame.image.load('pictures/talking_tom_face.png')
10
 
11
  # Create a display surface
@@ -14,13 +13,21 @@ screen = pygame.display.set_mode((640, 480), 0, 32)
14
  # Main game loop
15
  running = True
16
  while running:
 
17
  for event in pygame.event.get():
18
  if event.type == QUIT:
19
  running = False
20
 
21
- # Draw the 3D model of Talking Tom's face
 
 
 
 
 
22
  screen.blit(face_model, (100, 100))
23
 
 
 
24
  # Update the display
25
  pygame.display.flip()
26
 
 
1
  import pygame
2
+ from pygame.locals import *
 
3
 
4
  # Initialize Pygame
5
  pygame.init()
6
 
7
+ # Load the Talking Tom face image
8
  face_model = pygame.image.load('pictures/talking_tom_face.png')
9
 
10
  # Create a display surface
 
13
  # Main game loop
14
  running = True
15
  while running:
16
+ # Handle events
17
  for event in pygame.event.get():
18
  if event.type == QUIT:
19
  running = False
20
 
21
+ # --- Drawing Logic ---
22
+
23
+ # Clear the screen (fill with a background color)
24
+ screen.fill((255, 255, 255)) # Example: Fill with white
25
+
26
+ # Draw the Talking Tom's face
27
  screen.blit(face_model, (100, 100))
28
 
29
+ # --- End Drawing Logic ---
30
+
31
  # Update the display
32
  pygame.display.flip()
33