DEV 1364: Allow solo games with all rulesets through the CLI (#80)
* add support for automatic solo through RulesetBuilder * allow solo games with all modes in CLI
This commit is contained in:
parent
426da8ac5e
commit
25dc404493
3 changed files with 115 additions and 7 deletions
|
|
@ -133,7 +133,11 @@ func (gameState *GameState) initialize() {
|
|||
}
|
||||
|
||||
// Build ruleset from settings
|
||||
ruleset := rules.NewRulesetBuilder().WithSeed(gameState.Seed).WithParams(gameState.settings).Ruleset()
|
||||
ruleset := rules.NewRulesetBuilder().
|
||||
WithSeed(gameState.Seed).
|
||||
WithParams(gameState.settings).
|
||||
WithSolo(len(gameState.URLs) < 2).
|
||||
Ruleset()
|
||||
gameState.ruleset = ruleset
|
||||
|
||||
// Initialize snake states as empty until we can ping the snake URLs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue