Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier way to create a game #203

Open
njustesen opened this issue Jan 18, 2022 · 1 comment
Open

Easier way to create a game #203

njustesen opened this issue Jan 18, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@njustesen
Copy link
Owner

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()
@njustesen njustesen added the enhancement New feature or request label Jan 18, 2022
@mrbermell
Copy link
Collaborator

I think helper functions is the way to go! Similar to the game creating functions in tests.util but with more arguments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants