schedule

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ISchedule

type ISchedule interface {
	AddMatch(match *Match)
	GetMatches() []*Match
	GetMatchesForTeam(teamName string) []*Match
	GetOpponents(teamName string) ([]string, error)
	GetOpponentsForTeam(teamName string) ([]string, error)
	GetMatchesPlayedBy(teamName string) ([]*Match, error)
	GetWinsForTeam(teamName, skipTeamName string) (int, error)
	GetLossesForTeam(teamName, skipTeamName string) (int, error)
	GetTiesForTeam(teamName, skipTeamName string) (int, error)
	GetTotalMatchesPlayedForTeam(teamName string) (int, error)
	GetTotalMatchesPlayed() int
	CalculateWP(teamName string) (float64, error)
	CalculateOWP(teamName string) (float64, error)
	CalculateOOWP(teamName string) (float64, error)
	CalculateRPI(teamName string) (float64, error)
}

type Schedule

type Schedule struct {
	// contains filtered or unexported fields
}

func NewSchedule

func NewSchedule() *Schedule

func (*Schedule) AddMatch

func (s *Schedule) AddMatch(match *Match)

func (*Schedule) AddMatchFromString

func (s *Schedule) AddMatchFromString(matchString string)

func (*Schedule) CalculateOOWP

func (s *Schedule) CalculateOOWP(teamName string) (float64, error)

CalculateOOWP calculates the opponent's opponent's winning percentage for the specified team. The opponent's opponent's winning percentage is the average of the winning percentages of all of the opponents of the specified team.

func (*Schedule) CalculateOWP

func (s *Schedule) CalculateOWP(targetTeamName string) (float64, error)

func (*Schedule) CalculateRPI

func (s *Schedule) CalculateRPI(teamName string) (float64, error)

func (*Schedule) CalculateWP

func (s *Schedule) CalculateWP(teamName, skipTeamName string) (float64, error)

func (*Schedule) Contains

func (s *Schedule) Contains(teamName string) bool

func (*Schedule) GetLossesForTeam

func (s *Schedule) GetLossesForTeam(teamName, skipTeamName string) (int, error)

func (*Schedule) GetMatches

func (s *Schedule) GetMatches() []*Match

func (*Schedule) GetMatchesForTeam

func (s *Schedule) GetMatchesForTeam(teamName string) []*Match

func (*Schedule) GetMatchesPlayedBy

func (s *Schedule) GetMatchesPlayedBy(teamName string) ([]*Match, error)

func (*Schedule) GetMeetingCount

func (s *Schedule) GetMeetingCount(teamA, teamB string) (int, error)

func (*Schedule) GetOpponents

func (s *Schedule) GetOpponents(teamName string) ([]string, error)

func (*Schedule) GetTiesForTeam

func (s *Schedule) GetTiesForTeam(teamName, skipTeamName string) (int, error)

func (*Schedule) GetTotalMatchesPlayed

func (s *Schedule) GetTotalMatchesPlayed() int

func (*Schedule) GetTotalMatchesPlayedForTeam

func (s *Schedule) GetTotalMatchesPlayedForTeam(teamName string) (int, error)

func (*Schedule) GetWinsForTeam

func (s *Schedule) GetWinsForTeam(teamName, skipTeamName string) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL