Documentation
¶
Overview ¶
Package pool will hold pool-generation algorithms extracted from internal/helper. Stub created to unblock Slice 1 partial round-robin work (NFR-001, US11).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Match ¶
Match is a single head-to-head fixture between two players inside a pool. SideA/SideB point into the Player slice passed to the generator so callers can correlate match results back to the original entries.
func GenerateAdjacentPairings ¶
GenerateAdjacentPairings produces a partial round-robin: each player faces only their immediate neighbour in the input order. For N players the result is N-1 matches in the sequence (0,1), (1,2), ..., (N-2,N-1).
Use case (FR-052, R7): "league" / "partial-pool" competitions where a full round-robin would be too long; participants get a guaranteed pair of bouts (one with the player above, one with the player below) plus the two end-players who only get one. The list ordering is therefore load-bearing — the caller (Slice 1.D / Slice 6) is responsible for sorting by rank/seed before invoking this.
Returns nil when fewer than 2 players are passed (no valid pairing).
type Player ¶
type Player struct {
ID string
}
Player is the minimal pool-scoped player identity. The wider Player type with name/dojo/grade lives in internal/helper for Excel-rendering reasons; this struct deliberately stays small so pool generation can be tested in isolation (NFR-001, NFR-007 incremental adoption).