draft/pod.go

27 lines
533 B
Go
Raw Normal View History

2019-06-12 13:40:46 +00:00
package draft
// Pod is a group of players drafting packs/cubes
type Pod struct {
Players []*Player
}
// Player is a single player partecipating in a pod
type Player struct {
Packs []Pack
Picks []Card
}
// MakePod creates a pod with a specified number of players and a given set of packs
func MakePod(playerCount int, provider PackProvider) *Pod {
players := make([]*Player, playerCount)
for i := range players {
players[i] = &Player{
Packs: provider(),
Picks: []Card{},
}
}
return &Pod{
Players: players,
}
}