Documentation
¶
Index ¶
- func GetSupportedSizes() []int
- func ValidateTeamCount(count int) error
- type Config
- type Round
- type Structure
- type Summary
- type Tournament
- func (t *Tournament) Generate() error
- func (t *Tournament) GetBracket() []Round
- func (t *Tournament) GetRound(roundNumber int) (*Round, error)
- func (t *Tournament) GetRoundByName(name string) (*Round, error)
- func (t *Tournament) GetSummary() Summary
- func (t *Tournament) GetTeams() []types.Team
- func (t *Tournament) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSupportedSizes ¶
func GetSupportedSizes() []int
GetSupportedSizes returns the supported tournament sizes
func ValidateTeamCount ¶
ValidateTeamCount checks if a team count is supported
Types ¶
type Round ¶
type Round struct {
RoundNumber int `json:"round_number"`
Name string `json:"name"`
Fixtures []types.Fixture `json:"fixtures"`
}
Round represents a round in the knockout tournament
type Summary ¶
type Summary struct {
TotalTeams int `json:"total_teams"`
NumRounds int `json:"num_rounds"`
TotalFixtures int `json:"total_fixtures"`
TournamentType string `json:"tournament_type"`
}
Summary provides tournament statistics
type Tournament ¶
type Tournament struct {
// contains filtered or unexported fields
}
Tournament represents a complete single elimination knockout tournament
func New ¶
func New(teams []string) (*Tournament, error)
func (*Tournament) Generate ¶
func (t *Tournament) Generate() error
Generate creates the complete knockout bracket with random seeding
func (*Tournament) GetBracket ¶
func (t *Tournament) GetBracket() []Round
func (*Tournament) GetRound ¶
func (t *Tournament) GetRound(roundNumber int) (*Round, error)
GetRound returns a specific round by number (1-indexed)
func (*Tournament) GetRoundByName ¶
func (t *Tournament) GetRoundByName(name string) (*Round, error)
GetRoundByName returns a round by its name
func (*Tournament) GetSummary ¶
func (t *Tournament) GetSummary() Summary
GetSummary returns tournament statistics
func (*Tournament) GetTeams ¶
func (t *Tournament) GetTeams() []types.Team
GetTeams returns all teams in seeded order
func (*Tournament) String ¶
func (t *Tournament) String() string
Click to show internal directories.
Click to hide internal directories.