Files
project_game/fruit_catcher/game.py
2026-03-19 13:08:24 -04:00

18 lines
429 B
Python

from random import randint
from retro.game import Game
from .catcher import Catcher
from .manager import FruitManager
import json
WIDTH = 27
HEIGHT = 30
def play():
agents = [
Catcher((11, 29)),
FruitManager(),
]
state = {'score': 0, 'lives': 5, 'slices': 3}
game = Game(agents, state, board_size=(WIDTH, HEIGHT), framerate=24, color="white_on_indigo", dump_state="result.json")
game.play()