I will finish the rest of the project at home

This commit is contained in:
kdang
2026-01-16 09:36:38 -05:00
parent 267fffa9b0
commit 98f6f2716c
8 changed files with 32 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
from fruit import Fruit, SHAPE_DEFINITIONS
from random import choice
from random import choice, randint
from retro.errors import AgentNotFoundByName
class FruitManager:
@@ -13,5 +13,6 @@ class FruitManager:
self.create_piece(game)
def create_piece(self, game):
fruit = Fruit((14, 1), game, choice(SHAPE_DEFINITIONS))
x = randint(0, 26)
fruit = Fruit((x, 1), game, choice(SHAPE_DEFINITIONS))
game.add_agent(fruit)