generated from mwc/project_game
FINAL GAME SUBMISSION
Got the man chaser to work! Moved all global variables to nav_game.py so easier to adjust later
This commit is contained in:
@@ -1,18 +1,35 @@
|
||||
from retro.game import Game
|
||||
from board import Board
|
||||
|
||||
'''This contains the main info for setting up and running the game.'''
|
||||
"""This contains the main info for setting up and running the game."""
|
||||
|
||||
width = 25
|
||||
height = 25
|
||||
state= {"Score": 0}
|
||||
num_snacks = 10
|
||||
board = Board(width,height,num_snacks,state) #sets the original board
|
||||
num_chasers = 5
|
||||
|
||||
"""Values to call later, sets no more than 100 mines, and each list represent a level [score, num_mines],
|
||||
which is called in mine_counter in board.py."""
|
||||
MAX_MINES = 100
|
||||
LEVELS = [
|
||||
[5, 10],
|
||||
[10, 20],
|
||||
[15, 30],
|
||||
[20, 40],
|
||||
[30,50],
|
||||
[40,60],
|
||||
[50,70],
|
||||
[60,80],
|
||||
[70,90]
|
||||
]
|
||||
|
||||
board = Board(width,height,num_snacks,num_chasers,MAX_MINES,LEVELS,state) #sets the original board
|
||||
|
||||
game = Game(
|
||||
board.get_agents(num_snacks,state),
|
||||
board.get_agents(num_snacks,num_chasers,state),
|
||||
state,
|
||||
board_size = (width, height),debug=False
|
||||
)
|
||||
|
||||
game.play()
|
||||
Reference in New Issue
Block a user