import pygame
from random import randint
from settings import Settings

class Apple(pygame.sprite.Sprite):

    def __init__(self):
        super().__init__()
        self.img_apple = pygame.image.load('apple.png')
        apple_tile = Settings.TILE.value
        self.x = randint(0, (Settings.SCREEN_WIDTH.value // apple_tile)) * apple_tile
        self.y = randint(0, (Settings.SCREEN_HEIGHT.value // apple_tile)) * apple_tile
        self.rect = pygame.Rect(self.x, self.y, apple_tile, apple_tile)
    pass