FA-83853 / Sports scoring and tiebreakers / Member archive
Advantage shown before both players reach forty · case 03
A 40-15 score is rendered as an advantage instead of the numeric score.
Case contract
points is a string of rally winners, each character A or B. A game ends at the first point where a player has at least 4 points and leads by at least 2; characters after that point are ignored. Return "game A"/"game B" when finished; otherwise "deuce" when both have at least 3 points and are level, "advantage A"/"advantage B" when both have at least 3 points and differ by one, else "S-R" using the labels 0, 15, 30, 40 in A-B order. A character other than A or B that is reached before the game ends returns "invalid point <c>".
Why this case matters
Live scoreboards and umpire tablets derive the displayed tennis game score from a raw rally log.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: deuce band | "advantage A" | "40-15" | 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 ↗