When you are building a scoreboard, fixtures list, or live-score widget you need plausible-looking match data before the real feed exists. This generator produces fake results that respect each sport’s scoring conventions, so a basketball game reads 112–108 rather than 3–1, and a tennis match shows valid sets.
How it works
Each sport has its own model. Soccer and football draw low Poisson-like goal counts; basketball samples points in the realistic 80–130 band; cricket generates runs and wickets; tennis builds a best-of-three match where each set resolves to a legal game score (6–4, 7–5, 7–6, and so on). A small seedable random number generator drives everything, so supplying a seed makes the whole batch reproducible:
rng = mulberry32(seed)
score = sportModel(rng) # ranges and rules per sport
The winner is derived from the score, and a short summary string is assembled from the teams and result.
Per-sport scoring conventions
Each model in the generator mirrors the realities of how scores accumulate in that sport:
Soccer / Football. Goals are relatively rare — most real matches end 1–0, 2–1, or 0–0. The generator uses a low-count model where draws and single-goal wins are common, just as in real football. You will not see a 9–7 result here.
Basketball. Teams score in bursts across four quarters. The generator samples total points in the 80–130 range per side. Close finishes (margins of 2–5 points) are weighted higher than blowouts, because tight games are the norm at competitive levels.
Tennis. This is the most structurally complex model. Each set is generated to end at 6 games with at least a 2-game margin, or at 7–5, or at 7–6 after a tiebreak. A best-of-three match ends as soon as one player takes two sets, so valid set sequences include 2–0 and 2–1 (with the sets played correctly). A 2–2 result is impossible by design.
Cricket. Runs and wickets are generated together. An innings ends at either 10 wickets or the run target being reached. The output shows a result in the format team_one (runs/wickets) vs. team_two (runs/wickets) along with a winner.
Example output
For a batch of three mixed-sport fixtures:
Soccer: Eagles 2 – 1 Rovers (home win, 1 goal margin)
Basketball: Falcons 114 – 109 Comets (away win, 5 point margin)
Tennis: Torres beat Singh 6–4, 3–6, 7–5 (away, 3 sets)
Tips
- Use a fixed seed when you need identical data across repeated screenshots or test runs.
- Generate a multi-sport batch to confirm your UI handles both simple numeric scores and set-based displays without layout breaks.
- All team names are generic placeholders — safe to include in marketing mockups or published demos without attribution concerns.