Documentation
¶
Overview ¶
Package football implements football-style scoring (3-1-0) for chess tournaments.
Football scoring uses the same mechanism as standard scoring but with different default point values: 3 for a win, 1 for a draw, 0 for a loss. This is a popular alternative in informal club tournaments that rewards decisive results more heavily.
All point values are configurable via Options, following the same pointer-nil pattern as standard scoring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scorer ¶
type Scorer struct {
// contains filtered or unexported fields
}
Scorer implements the chesspairing.Scorer interface for football scoring. It wraps the standard scorer with football-specific defaults.
func New ¶
New creates a new football scorer with the given options. Any nil option fields receive football defaults (3-1-0) rather than standard defaults (1-½-0).
func NewFromMap ¶
NewFromMap creates a new football scorer from a map[string]any config.
func (*Scorer) PointsForResult ¶
func (s *Scorer) PointsForResult(result chesspairing.GameResult, rctx chesspairing.ResultContext) float64
PointsForResult returns the points awarded for a specific game result using football scoring defaults.
func (*Scorer) Score ¶
func (s *Scorer) Score(ctx context.Context, state *chesspairing.TournamentState) ([]chesspairing.PlayerScore, error)
Score calculates football-style scores for all active players.