Documentation ¶
Index ¶
- Variables
- func BasicTeamScoreLess(teams []TeamScore) func(i, j int) bool
- func FlipTies(place int) int
- func NewCompassDraw(baseTournament models.Tournament) models.Tournament
- func NewDoubleElimination(baseTournament models.Tournament) models.Tournament
- func NewGroupCompetition(children []models.Tournament, baseTournament models.Tournament) models.Tournament
- func NewRoundRobin(baseTournament models.Tournament) models.Tournament
- func NewSingleElimination(name string, teams []models.Team, seeded bool, gameSize uint32, advance uint32, ...) models.Tournament
- type CompassDraw
- type DoubleElimination
- type GroupCompetition
- func (g *GroupCompetition) GetActiveRound() models.Round
- func (g *GroupCompetition) GetAllRounds() []models.Round
- func (g *GroupCompetition) GetBracketOrder() []string
- func (g *GroupCompetition) GetRounds() models.Round
- func (g *GroupCompetition) NextRound() (models.Round, error)
- func (g *GroupCompetition) StartRound()
- type Pivot
- type RoundRobin
- type SingleElimination
- type TeamScore
Constants ¶
This section is empty.
Variables ¶
var CompassDivisionNames = []string{"East", "East-northeast", "Northeast", "North-northeast", "North", "North-northwest", "Northwest", "West-northwest", "West", "West-southwest", "Southwest", "South-southwest", "South", "South-southeast", "Southeast", "East-southeast"}
CompassDivisionNames will be used for the bracket names
Functions ¶
func BasicTeamScoreLess ¶
func NewCompassDraw ¶
func NewCompassDraw(baseTournament models.Tournament) models.Tournament
NewCompassDraw creates and returns a Compass Draw tournament, using the base tournamnet from a StorageEngine
func NewDoubleElimination ¶
func NewDoubleElimination(baseTournament models.Tournament) models.Tournament
func NewGroupCompetition ¶
func NewGroupCompetition(children []models.Tournament, baseTournament models.Tournament) models.Tournament
NewGroupCompetition creates and returns a Group Competition tournament wrapping the provided children tournaments, and uses the provided backing StorageEngine tournamnent
func NewRoundRobin ¶
func NewRoundRobin(baseTournament models.Tournament) models.Tournament
NewRoundRobin creates an returns a new Round Robin Tournamnet that uses the provided base tournament StorageEngine
func NewSingleElimination ¶
func NewSingleElimination(name string, teams []models.Team, seeded bool, gameSize uint32, advance uint32, scored bool, baseTournament models.Tournament) models.Tournament
NewSingleElimination creates a new Single Elimination Tournament
Types ¶
type CompassDraw ¶
type CompassDraw struct { models.Tournament // contains filtered or unexported fields }
CompassDraw fulfills the Tournament interface. Provides the logic for running a Tournament of a Compass Draw type. Commonly used in Tennis
func (*CompassDraw) GetActiveStage ¶
func (c *CompassDraw) GetActiveStage() models.Tournament
func (*CompassDraw) GetBracketOrder ¶
func (c *CompassDraw) GetBracketOrder() []string
func (*CompassDraw) Start ¶
func (c *CompassDraw) Start()
func (*CompassDraw) StartRound ¶
func (c *CompassDraw) StartRound()
type DoubleElimination ¶
type DoubleElimination struct { models.Tournament // contains filtered or unexported fields }
DoubleElimination fulfills the Tournament interface. Provides the logic for running a Tournament of a Double Elimination type. Commonly used as a conclusion of a season or competition
func (*DoubleElimination) GetActiveStage ¶
func (d *DoubleElimination) GetActiveStage() models.Tournament
func (*DoubleElimination) GetBracketOrder ¶
func (d *DoubleElimination) GetBracketOrder() []string
func (*DoubleElimination) Start ¶
func (d *DoubleElimination) Start()
func (*DoubleElimination) StartRound ¶
func (c *DoubleElimination) StartRound()
type GroupCompetition ¶
type GroupCompetition struct { models.Tournament // contains filtered or unexported fields }
Group Competition fulfills the Tournament interface. Provides the logic for running something like different leagues or groups within a larger tournament or season
func (*GroupCompetition) GetActiveRound ¶
func (g *GroupCompetition) GetActiveRound() models.Round
func (*GroupCompetition) GetAllRounds ¶
func (g *GroupCompetition) GetAllRounds() []models.Round
func (*GroupCompetition) GetBracketOrder ¶
func (g *GroupCompetition) GetBracketOrder() []string
func (*GroupCompetition) GetRounds ¶
func (g *GroupCompetition) GetRounds() models.Round
func (*GroupCompetition) StartRound ¶
func (g *GroupCompetition) StartRound()
type RoundRobin ¶
type RoundRobin struct { models.Tournament // contains filtered or unexported fields }
RoundRobin fulfills the Tournament interface, and provides the logic for tournaments where every team plays every other team
func (*RoundRobin) GetBracketOrder ¶
func (c *RoundRobin) GetBracketOrder() []string
func (*RoundRobin) Start ¶
func (c *RoundRobin) Start()
func (*RoundRobin) StartRound ¶
func (c *RoundRobin) StartRound()
type SingleElimination ¶
type SingleElimination struct {
models.Tournament
}
SingleElimination fulfills the Tournament interface. Provides the logic for running a Tournament of a Single Elimination type. Commonly used as a conclusion of a season or competition
func (*SingleElimination) GetActiveStage ¶
func (s *SingleElimination) GetActiveStage() models.Tournament
func (*SingleElimination) GetBracketOrder ¶
func (s *SingleElimination) GetBracketOrder() []string
func (*SingleElimination) Start ¶
func (s *SingleElimination) Start()
func (*SingleElimination) StartRound ¶
func (s *SingleElimination) StartRound()