generated from mwc/project_game
@chris My fruit offset does not work
This commit is contained in:
16
game.py
16
game.py
@@ -1,20 +1,16 @@
|
||||
from random import randint
|
||||
from retro.game import Game
|
||||
from retro.graph import Graph
|
||||
from catcher import Catcher
|
||||
from fruit import Fruit
|
||||
from manager import FruitManager
|
||||
|
||||
g = Graph()
|
||||
g.get_or_create_edge(26, 10, 26, 22)
|
||||
agents = g.get_agents()
|
||||
for agent in agents:
|
||||
agent.color = "white_on_indigo"
|
||||
WIDTH = 27
|
||||
HEIGHT = 30
|
||||
|
||||
agents = [
|
||||
Catcher((14, 24)),
|
||||
Fruit((14, 2)),
|
||||
Catcher((11, 29)),
|
||||
FruitManager(),
|
||||
]
|
||||
|
||||
state = {'Score': 0}
|
||||
game = Game(agents, state, board_size=(35, 25), framerate=24, color="white_on_indigo")
|
||||
game = Game(agents, state, board_size=(WIDTH, HEIGHT), framerate=24, color="white_on_indigo")
|
||||
game.play()
|
||||
Reference in New Issue
Block a user