generated from mwc/project_game
Fixing game to working state
This commit is contained in:
17
fruit_catcher/game.py
Normal file
17
fruit_catcher/game.py
Normal file
@@ -0,0 +1,17 @@
|
||||
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}
|
||||
game = Game(agents, state, board_size=(WIDTH, HEIGHT), framerate=24, color="white_on_indigo", dump_state="result.json")
|
||||
game.play()
|
||||
Reference in New Issue
Block a user