Skip to content

Reference

tilttek/tournament

Every public type of the package, with its role. The types marked internal may change in any version.

Tournaments

TypeRole
TournamentsThe service: starts tournaments, prepares and publishes rounds, takes, settles and corrects results, takes withdrawals and reschedules rounds; gives the standings, the bracket, a participant's schedule and the explanation of a pairing.
TournamentA tournament as it is declared: participants, stages, scoring, tie-breakers and the published seed.
TournamentStateA tournament as the store keeps it: its declaration, the first order, the rounds, the results, the conflicts, the withdrawals, the podium and the version.
StageA stage: Swiss, round robin or single elimination, with its rounds, pools, legs and qualifiers.
StageFormatThe format of a stage.
ScoringThe points of a win, a draw, a loss, a bye and the forfeits, in whole numbers.
RoundA round of a stage: its number, its tables and the date it starts.
PairingA table: the participant who plays first, the one who plays second or none for a bye or a rest, the pool and the reasons.
PairingReasonOne reason of a pairing: its kind, the participant, the other participant and the round it refers to.
ReasonKindThe kinds of reasons, as stable codes.
ScheduledGameA round in a participant's schedule.
ExplanationWhy two participants meet in a round, or do not.
ExplanationKindThe kinds of explanations, as stable codes.
SeededDrawThe order the published seed gives participants.
IdentifierInternal: the shape of every identifier.
ProgressInternal: what a tournament's state gives, for one call.

Results

TypeRole
ResultThe result of a match: its outcome and mission points.
OutcomeHow a match ended, from the side of the first player.
SubmissionA result as one person entered it.
RecordingWhat a result entered, settled or corrected, or a withdrawal, did: its status, the changes of the standings, the events.
RecordingStatusRecorded, unchanged or in conflict.
RecordsThe records of the participants of a stage.
RecordWhat one participant did in a stage.
GameOne match of a participant, as the standings read it.

Pairings

TypeRole
Swiss\SwissPairerPairs a Swiss round by score groups.
Contract\MatcherInternal: a matching of the lowest cost found.
Swiss\ExactMatcherInternal: the matching of the lowest cost, for small groups.
Swiss\BoundedMatcherInternal: a matching of a low cost, in bounded time, for larger groups.
RoundRobin\BergerTableThe rounds of a pool by the Berger tables.
RoundRobin\PoolsParticipants spread over pools in a snake.
Elimination\BracketA single-elimination bracket by seeds.
Elimination\BracketMatchA match of a bracket.
Elimination\BracketStateA bracket filled with what is known: champion, podium, the tables of a round, the round each participant reached.
Elimination\MatchStateWhere a match of a bracket stands.
Elimination\SeedOrderThe places of the seeds in a bracket.
Elimination\SlotA place of a bracket: a participant, a qualifier, the winner of a match, or a bye.
Elimination\SlotKindWhat fills a place.

Standings and tie-breakers

TypeRole
Standings\StandingsThe standings of a stage or a pool, and what moved since others.
Standings\StandingA participant's place: rank, points, tie-breaker scores, the draw, the withdrawal.
Standings\StandingChangeHow a participant's rank and points moved.
Standings\StandingsCalculatorRanks by points, then by the tie-breakers in order, then by the draw.
Contract\TiebreakerA tie-breaker.
Tiebreak\TiebreakersThe tie-breakers a tournament may declare, by code.
Tiebreak\BuchholzThe Buchholz score, cut or not.
Tiebreak\SonnebornBergerThe Sonneborn-Berger score.
Tiebreak\HeadToHeadThe points scored between the participants still tied.
Tiebreak\WinsThe matches won over the board.
Tiebreak\MissionPointsThe mission points scored.

Seeding, storage and events

TypeRole
Contract\SeedingSourceWhere the strengths of participants come from.
Seeding\FixedSeedingThe strengths given, or a list in order.
Seeding\RatingSeedingThe strengths of the ratings of tilttek/rating for one game.
Seeding\InitialOrderThe first order: by strength, then by the seed.
Contract\TournamentStoreWhere tournaments are kept, at a version.
Store\InMemoryTournamentStoreThe tournaments in memory, for tests.
Event\TournamentFinishedThe tournament has its winner and its podium.

Exceptions

TypeRole
Exception\TournamentExceptionEvery exception of the library.
Exception\InvalidTournamentA value out of its range or shape, or unknown.
Exception\InvalidResultA result that does not fit its table.
Exception\RoundRefusedA round asked for too early or too late.
Exception\TournamentConflictThe tournament changed since it was read.
Exception\TournamentNotFoundNo tournament has the identifier.