2022-10-26 21:57:29 +03:00
|
|
|
from point import Point
|
|
|
|
from random import randint
|
|
|
|
from settings import *
|
|
|
|
|
|
|
|
|
|
|
|
class Food(Point):
|
2022-10-27 17:41:10 +03:00
|
|
|
def __init__(self, x, y):
|
2022-10-26 21:57:29 +03:00
|
|
|
Point.__init__(self, x, y)
|
|
|
|
|
|
|
|
def generate_new(self) -> None:
|
|
|
|
self.x = randint(0, WIDTH - 1)
|
|
|
|
self.y = randint(0, HEIGHT - 1)
|