Guest User

Untitled

a guest
Mar 14th, 2023
13
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. import pygame
  2. import random
  3.  
  4.  
  5. class Apple(pygame.sprite.Sprite):
  6. def __init__(self):
  7. super(Apple, self).__init__()
  8. self.image = pygame.image.load("images/apple.png")
  9. random_position = pygame.Rect(
  10. random.randrange(0, 24)*32,
  11. random.randrange(1, 18)*32,
  12. 32,
  13. 32
  14. )
  15. self.rect = random_position
  16.  
Add Comment
Please, Sign In to add comment