Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pygame
- import random
- class Apple(pygame.sprite.Sprite):
- def __init__(self):
- super(Apple, self).__init__()
- self.image = pygame.image.load("images/apple.png")
- random_position = pygame.Rect(
- random.randrange(0, 24)*32,
- random.randrange(1, 18)*32,
- 32,
- 32
- )
- self.rect = random_position
Add Comment
Please, Sign In to add comment