Compare commits
2 commits
c5d833db82
...
472c011c0d
Author | SHA1 | Date | |
---|---|---|---|
472c011c0d | |||
f19ae98427 |
3 changed files with 35 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
# draft-mlp
|
# gen-packs-mlp
|
||||||
|
|
||||||
Example command that generates random MLP:CCG booster packs for a given set.
|
Example command that generates random MLP:CCG booster packs for a given set.
|
||||||
This is mostly done to test the library itself.
|
This is mostly done to test the library itself.
|
|
@ -1,5 +0,0 @@
|
||||||
package mlp
|
|
||||||
|
|
||||||
type Cube struct {
|
|
||||||
|
|
||||||
}
|
|
34
mlp/i8pcube.go
Normal file
34
mlp/i8pcube.go
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
package mlp
|
||||||
|
|
||||||
|
import "git.fromouter.space/mcg/draft"
|
||||||
|
|
||||||
|
// I8PCube is a cube that uses I8Pages's pack schema
|
||||||
|
// I8Pages' cube uses different kinds of packs, so a single schema is not possible.
|
||||||
|
// Therefore, I8PCube itself is not a valid set, but contains two valid sets for
|
||||||
|
// both types of packs (main deck / problems)
|
||||||
|
type I8PCube struct {
|
||||||
|
Main *I8PSet
|
||||||
|
Problems *I8PSet
|
||||||
|
}
|
||||||
|
|
||||||
|
// I8PSet is one of the sets of packs contained in a I8PCube
|
||||||
|
type I8PSet struct {
|
||||||
|
Cards map[string][]Card
|
||||||
|
Schema draft.PackSchema
|
||||||
|
}
|
||||||
|
|
||||||
|
// PackSchema returns the pack schema for building packs from a I8PCube
|
||||||
|
func (s *I8PSet) PackSchema() draft.PackSchema {
|
||||||
|
return s.Schema
|
||||||
|
}
|
||||||
|
|
||||||
|
// MakeI8PCube takes an organized set of cards and sorts them into a draftable I8PCube
|
||||||
|
func MakeI8PCube(cards map[string][]Card) *I8PCube {
|
||||||
|
//TODO Separate problems from main deck
|
||||||
|
//TODO Make schemas
|
||||||
|
return &I8PCube{
|
||||||
|
Main: &I8PSet{
|
||||||
|
Cards: cards,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue