Skip to content

feat(tournaments): league table, games-based scoring, no draws, byes without points, withdraw players - #170

Merged
dinooo13 merged 5 commits into
mainfrom
feat/tournament-league-scoring
Oct 3, 2026
Merged

dinooo13 merged 5 commits into
mainfrom
feat/tournament-league-scoring

Conversation

@dinooo13

@dinooo13 dinooo13 commented Oct 3, 2026

Copy link
Copy Markdown
Owner

Summary

Tester feedback (Sept 2026) on round-robin tournaments.

  • Results are only 2:0, 2:1, 1:2 or 0:2; there are no draws.
  • A 2:0 scores more than a 2:1.
  • Byes give no points by default.
  • Round robin shows a football-style league table instead of the OMW%/GW%/OGW% percentages.
  • The organizer can take a player out of the standings (Kickertool approach).

Roadmap phase / item

Phase 7 (Turniere), "Tester-Feedback Sept 2026".

Changes

  • Results
    • Quick buttons 2:0, 2:1, 1:2, 0:2; the "Unentschieden" (draw) button is removed.
    • Equal scores are rejected in the UI and by the server (draws_not_allowed).
    • Legacy draws are still scored.
  • Scoring (tournament.scoring)
    • games: 3 for a 2:0 win, 2 for a 2:1 win, 1 for a 1:2 loss, 0 for a 0:2 loss. Default for new tournaments.
    • match: classic 3/0.
    • OMW% stays meaningful under both.
  • Byes (tournament.bye_scoring): none (default: no points, not a played match, shown as "Spielfrei") or win (the old 2:0).
  • Round robin standings
    • League table with Pl., Sp., S, N, Spiele, Diff., Pkt.
    • Order: points → game difference → head-to-head (exactly two level) → games won → seed.
    • Rounds are labelled "Spieltag n", and there is a crosstable view.
    • Swiss keeps OMW%, GW% and OGW%.
  • "Aus der Wertung nehmen" (tournament_participant.withdrawn)
    • Every match with the player, past and future, is left out of everyone's standings, and their open match is voided.
    • The player is listed last. It can be undone while the tournament runs.
    • Withdrawing wins over dropping: if the player is also dropped, their fixtures are not turned into scoring byes.
  • Pairing swaps are disabled for round robin (pairings_fixed), because they broke the fixed schedule.
  • Settings: scoring and bye scoring are chosen at creation and can be edited during registration.
  • Migration 0018
    • Adds the three columns.
    • Backfills existing tournaments to match/win, so their points don't change.
    • Existing round robins now use the league tiebreakers, so the order among players level on points can change (noted in the ADR).
  • Docs: ADR 0028; ADR 0008 is marked partially superseded; DEVELOPMENT.md "Turniere" and the Roadmap are updated.

Test plan

  • CI gates pass locally:
    • pnpm lint, pnpm typecheck, pnpm typecheck:e2e
    • pnpm test: 1860 tests
    • pnpm test:e2e: 139 on the main commit; the follow-up fix re-ran e2e/tournaments.spec.ts
  • Tests added/updated:
    • scoring and tiebreakers
    • withdrawing, and dropped + withdrawn
    • full round-robin API run
    • migration backfill
    • new round-robin E2E
    • old draw/bye expectations updated
  • Docs/ADR updated

🤖 Generated with Claude Code

dinooo13 and others added 5 commits October 3, 2026 04:37
…ers, no draws

Per-tournament scoring ('games' 3/2/1/0 or classic 'match' 3/0) and bye
scoring ('none' or 'win'), a withdrawn flag on participants that removes
all their matches from everybody's standings, league-table tiebreakers
(points, game difference, head-to-head of two, games won, seed) for round
robin, draws rejected with draws_not_allowed, and fixed round-robin
pairings. Migration 0018 backfills existing tournaments with 'match' and
'win' so their standings do not change. See ADR 0028 (next commit).

Updated tests that encoded the old behavior: the bye in tournaments-api
is now 0:0 by default, and the draw-normalisation test now asserts the
rejection.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…coring settings in the UI

Quick buttons for 2:0, 2:1, 1:2 and 0:2 (no draw), a Bundesliga-style
table with Spieltage and a crosstable for round robin, "Aus der Wertung
nehmen" next to dropping, scoring and bye scoring when creating a
tournament and during registration, no swap button for round robin.
Adds a round-robin E2E spec; the Swiss E2E expectations now follow games
scoring and the page-test fixtures model a pre-ADR-0028 tournament.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd withdrawing

Marks ADR 0008 as partially superseded, updates the Turniere section of
DEVELOPMENT.md and records the tester-feedback items under Phase 7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A participant who was both dropped and withdrawn had their fixtures turned
into byes for the opponent, which score under byeScoring 'win' even though
nothing against a withdrawn player may count. Withdrawn players are now left
out of the dropped set, so their fixture is still created and then voided.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… taken on main)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dinooo13
dinooo13 force-pushed the feat/tournament-league-scoring branch from e8494e9 to a9fb286 Compare October 3, 2026 02:37
@dinooo13
dinooo13 merged commit f67887c into main Oct 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant