def create_fruit():
"""Создает новый фрукт"""
fruit_types = ['banana', 'mango', 'apple'] # Список типов фруктов
if random.random() < 0.1:
fruit_type = 'bomb'
else:
fruit_type = random.choice(fruit_types)
fruit = Actor(fruit_type)
fruit.scale = 0.5 # Уменьшаем размер фрукта
fruit.x = random.randint(100, WIDTH - 100)
fruit.y = HEIGHT + 50
fruit.speed = random.randint(5, 10)
fruit.type = fruit_type
fruit.sliced = False
fruit.radius = 30
return fruit