Allow for custom problem pack sizes
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
096b07031a
commit
9df4c610dc
3 changed files with 7 additions and 8 deletions
|
@ -40,8 +40,9 @@ func loadCube(cubeURL string) ([]draft.Card, error) {
|
||||||
|
|
||||||
// I8PCubeConfig is an external JSON doc with the I8PCube pack seeding schema and card list
|
// I8PCubeConfig is an external JSON doc with the I8PCube pack seeding schema and card list
|
||||||
type I8PCubeConfig struct {
|
type I8PCubeConfig struct {
|
||||||
Schema mlp.I8PSchema
|
Schema mlp.I8PSchema
|
||||||
Cards map[mlp.I8PType][]string
|
ProblemPackSize int
|
||||||
|
Cards map[mlp.I8PType][]string
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToCube creates a I8PCube from the config
|
// ToCube creates a I8PCube from the config
|
||||||
|
@ -57,7 +58,7 @@ func (cfg *I8PCubeConfig) ToCube() (*mlp.I8PCube, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make cube and return it
|
// Make cube and return it
|
||||||
return mlp.MakeI8PCube(pool, cfg.Schema), nil
|
return mlp.MakeI8PCube(pool, cfg.Schema, cfg.ProblemPackSize), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func loadI8PCube(cubeURL string) (*mlp.I8PCube, error) {
|
func loadI8PCube(cubeURL string) (*mlp.I8PCube, error) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ go 1.12
|
||||||
require (
|
require (
|
||||||
git.fromouter.space/Artificiale/moa v0.0.1-p2
|
git.fromouter.space/Artificiale/moa v0.0.1-p2
|
||||||
git.fromouter.space/mcg/cardgage v0.0.4
|
git.fromouter.space/mcg/cardgage v0.0.4
|
||||||
git.fromouter.space/mcg/draft v0.0.4
|
git.fromouter.space/mcg/draft v0.0.6
|
||||||
github.com/go-kit/kit v0.8.0
|
github.com/go-kit/kit v0.8.0
|
||||||
github.com/mitchellh/mapstructure v1.1.2
|
github.com/mitchellh/mapstructure v1.1.2
|
||||||
)
|
)
|
||||||
|
|
|
@ -3,10 +3,8 @@ git.fromouter.space/Artificiale/moa v0.0.1-p2 h1:KhoRQeYCFIpHZEucrXz142O5zfSsyEx
|
||||||
git.fromouter.space/Artificiale/moa v0.0.1-p2/go.mod h1:dHYul6vVMwDCzre18AFs6NmI22yeI7AE0iQC1jFEQi0=
|
git.fromouter.space/Artificiale/moa v0.0.1-p2/go.mod h1:dHYul6vVMwDCzre18AFs6NmI22yeI7AE0iQC1jFEQi0=
|
||||||
git.fromouter.space/mcg/cardgage v0.0.4 h1:LHMUeNMh0QiMkM3TgsLe9l5sDmanQrej6UiWSVTb67c=
|
git.fromouter.space/mcg/cardgage v0.0.4 h1:LHMUeNMh0QiMkM3TgsLe9l5sDmanQrej6UiWSVTb67c=
|
||||||
git.fromouter.space/mcg/cardgage v0.0.4/go.mod h1:vCmJ9HRdRGSWg2YQW9oNG7geYACdgWYmzL+zZdrsYhQ=
|
git.fromouter.space/mcg/cardgage v0.0.4/go.mod h1:vCmJ9HRdRGSWg2YQW9oNG7geYACdgWYmzL+zZdrsYhQ=
|
||||||
git.fromouter.space/mcg/draft v0.0.3 h1:+Bq7cMPuBH6c8UCexaegJjc/UbFTE1+mAikcuvjtW+c=
|
git.fromouter.space/mcg/draft v0.0.6 h1:eS9cjDXtWBKRgwIcioTQlYpAZt7iHsNSvo9fr9ZPSlo=
|
||||||
git.fromouter.space/mcg/draft v0.0.3/go.mod h1:QQmDm9FgAZL3b2/pIDd4Eo608SxMiCQQe5vIybe/CDY=
|
git.fromouter.space/mcg/draft v0.0.6/go.mod h1:QQmDm9FgAZL3b2/pIDd4Eo608SxMiCQQe5vIybe/CDY=
|
||||||
git.fromouter.space/mcg/draft v0.0.4 h1:BuyjLuKnNUrPQe33CaEMCv+OIe1vPBDdeD2Kl2Fklvs=
|
|
||||||
git.fromouter.space/mcg/draft v0.0.4/go.mod h1:QQmDm9FgAZL3b2/pIDd4Eo608SxMiCQQe5vIybe/CDY=
|
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
||||||
github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
|
||||||
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
|
||||||
|
|
Loading…
Reference in a new issue