Creates a new empty season (defaults to the current year).
ReadonlycompleteReturns true if the entire season (including playoffs) is complete.
ReadonlyconferencesReturns the conferences as a JSON array.
ReadonlyplayoffsReturns the playoffs as a JSON object.
ReadonlyregularReturns true if the regular season is complete.
ReadonlystandingsReturns the overall standings as a JSON array of [teamId, record] pairs.
ReadonlystartedReturns true if the season has started (any game played).
ReadonlyteamsReturns the teams as a JSON object (BTreeMap<usize, FootballTeam>).
ReadonlyweeksReturns the season weeks as a JSON array.
Gets the season year.
Adds a conference to the season (takes ownership).
Returns a team's conference record as a JSON object.
Returns the standings for a specific conference as a JSON array.
Returns a team's division record as a JSON object.
Returns the standings for a specific division as a JSON array.
Generates the playoff bracket.
options is a plain JS object matching LeagueSeasonPlayoffOptions.
Generates the regular season schedule.
options is a plain JS object matching LeagueSeasonScheduleOptions
(e.g. { division_games: 2, permute: true }).
Returns the playoff picture as a JSON object.
Returns a team's playoff record as a JSON object.
Simulates the entire season (regular season + playoffs if generated).
Simulates a single matchup to completion. Returns the game log as JSON.
Simulates a single play of a matchup. Returns the game log as JSON
if the game finished on this play, or undefined if still in progress.
Simulates a full round in a single conference bracket.
Simulates a single playoff matchup to completion. Returns game log as JSON.
Simulates a single play of a playoff matchup. Returns game log as JSON
if the game finished, or undefined if still in progress.
Simulates a full playoff round across all conference brackets.
Simulates a single winners bracket matchup to completion. Returns game log as JSON.
Simulates a single play of a winners bracket matchup. Returns game log
as JSON if the game finished, or undefined if still in progress.
Checks if a team exists in the season.
Returns true if a team made it to the championship.
Returns true if a team participated in the playoffs.
Returns all matchups involving a team as a JSON object.
Returns true if a team won the championship.
Returns the season as a JSON-serializable object.
A WASM-friendly wrapper around
LeagueSeason.