Documentation ¶
Index ¶
- Constants
- Variables
- type ELOTicker
- type League
- func (l *League) AddMatch(results []*MatchResult) ([]MatchDiff, error)
- func (l *League) AddPlayer(name string) error
- func (l *League) GenerateGraph() (string, error)
- func (l *League) GetMatches() []Match
- func (l *League) GetPlayer(name string) (*Player, error)
- func (l *League) GetPlayerELO(name string) (int, error)
- func (l *League) GetPlayerStats(name string) (*PlayerStats, error)
- func (l *League) GetPlayers() []*Player
- func (l *League) RemovePlayer(name string) error
- func (l *League) ResetMatches()
- func (l *League) ResetPlayers()
- type Match
- type MatchDiff
- type MatchResult
- type Player
- type PlayerStats
- type RaceTicker
Constants ¶
View Source
const (
InitialELO = 1000
)
Variables ¶
View Source
var ( ErrPlayerAlreadyExists = errors.New("player already exists") ErrPlayerNotFound = errors.New("player not found") ErrMatchNotFound = errors.New("match not found") ErrInvalidMatch = errors.New("invalid match") ErrInvalidELOChange = errors.New("invalid elo change") ErrInvalidPlayer = errors.New("invalid player") ErrInvalidPlayerStats = errors.New("invalid player stats") ErrInvalidLeague = errors.New("invalid league") ErrNoPlayers = errors.New("no players") )
Functions ¶
This section is empty.
Types ¶
type League ¶
func (*League) GenerateGraph ¶
func (*League) GetMatches ¶
func (*League) GetPlayerStats ¶
func (l *League) GetPlayerStats(name string) (*PlayerStats, error)
func (*League) GetPlayers ¶
func (*League) RemovePlayer ¶
func (*League) ResetMatches ¶ added in v0.0.3
func (l *League) ResetMatches()
func (*League) ResetPlayers ¶
func (l *League) ResetPlayers()
type Match ¶
type Match struct { Results []*MatchResult Date time.Time }
type MatchResult ¶
type PlayerStats ¶
type RaceTicker ¶
type RaceTicker struct{}
Click to show internal directories.
Click to hide internal directories.