botbowl
botbowl copied to clipboard
Easier way to create a game
There are currently too many steps to take to create a game. This should be hidden away in either the constructor of Game og as a helper function.
The current steps are:
# Setup a game
config = botbowl.load_config("bot-bowl-iii")
ruleset = botbowl.load_rule_set(config.ruleset)
arena = botbowl.load_arena(config.arena)
home = botbowl.load_team_by_filename("human", ruleset)
away = botbowl.load_team_by_filename("human", ruleset)
agent_home = Agent("home agent", human=True)
agent_away = Agent("home agent", human=True)
game = botbowl.Game(1, home, away, agent_home, agent_away, config, arena=arena, ruleset=ruleset)
game.init()
I think helper functions is the way to go! Similar to the game creating functions in tests.util but with more arguments.