football

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

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

func New(opts standard.Options) *Scorer

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

func NewFromMap(m map[string]any) *Scorer

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

Score calculates football-style scores for all active players.

Jump to

Keyboard shortcuts

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