DEV-765 pipeline refactor (#64)
Refactor rulesets into smaller composable operations In order to mix up the functionality from different rulesets like Solo, Royale, etc. the code in these classes needs to be broken up into small functions that can be composed in a pipeline to make a custom game mode.
This commit is contained in:
parent
5e629e9e93
commit
397d925110
25 changed files with 1475 additions and 222 deletions
|
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"github.com/BattlesnakeOfficial/rules"
|
||||
"github.com/BattlesnakeOfficial/rules/test"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
@ -18,7 +19,7 @@ func TestBuildSnakeRequestJSON(t *testing.T) {
|
|||
|
||||
func TestBuildSnakeRequestJSONEmptyRulesetSettings(t *testing.T) {
|
||||
snakeRequest := exampleSnakeRequest()
|
||||
snakeRequest.Game.Ruleset.Settings = RulesetSettings{}
|
||||
snakeRequest.Game.Ruleset.Settings = rules.Settings{}
|
||||
data, err := json.MarshalIndent(snakeRequest, "", " ")
|
||||
require.NoError(t, err)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue