FA-84028 / Sports scoring and tiebreakers / Member archive
Goals scored consulted before goal difference · case 03
Two teams level on points are ordered by goals scored when goal difference should decide.
Case contract
Round-robin football table. results rows are [home, home_goals, away, away_goals]. A win is 3 points, a draw 1. Rank by points, then goal difference, then goals scored, then head-to-head points among the teams still level on all three (only matches between those teams), then team name. Return rows [team, played, points, goal_difference, goals_for].
Why this case matters
League tables drive promotion, relegation and seeding; the tiebreaker cascade order matters.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| boundary head to head decides | [["Brent", 2, 3, 0, 3], ["Ashby", 2, 3, 0, 3], ["Corby", 1, 3, 1, 2], ["Dover", 1, 0, -1, 1]] | [["Corby", 1, 3, 1, 2], ["Brent", 2, 3, 0, 3], ["Ashby", 2, 3, 0, 3], ["Dover", 1, 0, -1, 1]] | 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 ↗