Documentation
¶
Index ¶
- Variables
- func AddPlayerDataToSheet(f *excelize.File, players []Player, sanitize bool)
- func AddPoolDataToSheet(f *excelize.File, pools []Pool, sanitize bool)
- func AddPoolsToSheet(f *excelize.File, pools []Pool) error
- func AddPoolsToTree(f *excelize.File, sheetName string, pools []Pool)
- func ApplySeeds(players []Player, assignments []domain.SeedAssignment) error
- func CalculateDepth(node *Node) int
- func ConvertPlayersToWinners(players []Player, sanitized bool) map[string]MatchWinner
- func CreateNamesToPrint(f *excelize.File, players []Player, sanitized bool)
- func CreateNamesWithPoolToPrint(f *excelize.File, pools []Pool, sanitized bool)
- func CreatePoolMatches(pools []Pool)
- func CreatePoolRoundRobinMatches(pools []Pool)
- func CreateTagsSheet(f *excelize.File, pools []Pool) error
- func CreateTreeBracket(f *excelize.File, sheet string, col int, startRow int, size int) string
- func FillEstimations(f *excelize.File, numPools int64, numPoolMatches int64, extraPools int64, ...)
- func FillInMatches(f *excelize.File, eliminationMatchRounds [][]*Node)
- func GenerateFinals(pools []Pool, poolWinners int) []string
- func GetBorderStyleBottomLeft(f *excelize.File) int
- func GetBorderStyleLeft(f *excelize.File) int
- func MatchHeader(f *excelize.File, sheetName string, startColName string, poolRow int, ...)
- func ParseSeedsFile(filePath string) ([]domain.SeedAssignment, error)
- func PrintLeafNodes(node *Node, f *excelize.File, sheetName string, startCol int, startRow int, ...)
- func PrintPoolMatches(f *excelize.File, pools []Pool, teamMatches int, numWinners int) map[string]MatchWinner
- func PrintTeamEliminationMatches(f *excelize.File, poolMatchWinners map[string]MatchWinner, ...)
- func ReadEntriesFromFile(filePath string) ([]string, error)
- func RemoveDuplicates(input []string) []string
- func RoundToPowerOf2(x, y float64) (int, error)
- func SetSheetLayoutLandscapeA3(f *excelize.File, sheetName string)
- func SetSheetLayoutPortraitA4(f *excelize.File, sheetName string)
- type Match
- type MatchWinner
- type Node
- type Player
- type Pool
- type RowStack
- type Stack
Constants ¶
This section is empty.
Variables ¶
var TemplateFile fs.FS
var WebFs embed.FS
Functions ¶
func AddPlayerDataToSheet ¶ added in v0.3.0
func AddPoolDataToSheet ¶ added in v0.3.0
func ApplySeeds ¶ added in v0.11.0
func ApplySeeds(players []Player, assignments []domain.SeedAssignment) error
ApplySeeds assigns seeds to the helper players, handling swaps if needed Returns an error if an assigned name could not be matched
func CalculateDepth ¶
func ConvertPlayersToWinners ¶ added in v0.3.0
func ConvertPlayersToWinners(players []Player, sanitized bool) map[string]MatchWinner
func CreateNamesToPrint ¶
func CreateNamesWithPoolToPrint ¶ added in v0.3.0
func CreatePoolMatches ¶
func CreatePoolMatches(pools []Pool)
func CreatePoolRoundRobinMatches ¶
func CreatePoolRoundRobinMatches(pools []Pool)
func CreateTreeBracket ¶
func FillEstimations ¶ added in v0.6.0
func FillInMatches ¶
func GenerateFinals ¶
func GetBorderStyleLeft ¶
func MatchHeader ¶
func ParseSeedsFile ¶ added in v0.11.0
func ParseSeedsFile(filePath string) ([]domain.SeedAssignment, error)
ParseSeedsFile reads a CSV file mapping names to seed positions
func PrintLeafNodes ¶
func PrintPoolMatches ¶
func PrintTeamEliminationMatches ¶ added in v0.2.0
func ReadEntriesFromFile ¶ added in v0.9.0
func RemoveDuplicates ¶
RemoveDuplicates removes duplicate strings from the input slice and returns a new slice without duplicates.
The function takes a parameter named input, which is a slice of strings. It represents the input slice from which duplicates and empty strings will be removed.
func RoundToPowerOf2 ¶ added in v0.4.0
func SetSheetLayoutLandscapeA3 ¶ added in v0.11.0
func SetSheetLayoutPortraitA4 ¶ added in v0.11.0
Types ¶
type MatchWinner ¶
type MatchWinner struct {
// contains filtered or unexported fields
}
type Node ¶
type Node struct {
LeafNode bool
// sheet for Cell Values
SheetName string
// Pool Number or Cell value
LeafVal string
Val int64
Left *Node
Right *Node
// contains filtered or unexported fields
}
func CreateBalancedTree ¶
func SubdivideTree ¶ added in v0.4.0
function that subdivides a tree into a specified number of subtrees
type Player ¶
type Player struct {
Name string
DisplayName string
Dojo string
Metadata []string
PoolPosition int64
Seed int
// contains filtered or unexported fields
}
func StandardSeeding ¶ added in v0.11.0
StandardSeeding reorders players into bracket positions such that seeded participants (Seed > 0) are spaced according to tournament standards (e.g., #1 and #2 on opposite halves). Unseeded players fill the remaining slots.
type Pool ¶
type Pool struct {
PoolName string
Players []Player
Matches []Match
// contains filtered or unexported fields
}
func CreatePools ¶
type RowStack ¶ added in v0.2.0
type RowStack struct {
// contains filtered or unexported fields
}