FA-84110 / Sports scoring and tiebreakers / Member archive
Dash reserved for the leader row only · case 05
A team with zero games behind shows "0.0" or a trailing team ahead on games shows "-".
Case contract
Division standings. teams rows are [name, wins, losses]. Win percentage is wins / games (0 for no games) shown with three decimals and the leading zero dropped (".500", but "1.000"). Sort by win percentage, then more wins, then name. The leader is the first sorted row; games behind = ((leader_wins - wins) + (losses - leader_losses)) / 2, shown as "-" when zero and otherwise with one decimal (negative values allowed). Return [name, pct, gb] rows.
Why this case matters
Standings pages and playoff-race widgets print win percentage and games behind.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| control equal pct more wins first | [["Bucks", ".500", "-"], ["Cats", ".500", "0.0"]] | [["Bucks", ".500", "-"], ["Cats", ".500", "-"]] | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗