ReadonlycurrentReturns the current season as a JSON object, or undefined if none.
ReadonlyseasonsReturns the past seasons as a JSON array.
ReadonlyteamsReturns the league teams as a JSON object (BTreeMap<usize, LeagueTeam>).
Adds a conference to the current season (takes ownership).
Creates a new season (archives the current one if complete).
Adds a new team to the league (auto-assigns an ID).
Generates the schedule for the current season.
Returns a specific matchup as JSON, or undefined if not found.
Returns a specific season by year as JSON, or undefined if not found.
Returns a specific team as a JSON object, or undefined if not found.
Returns a specific week as JSON, or undefined if not found.
Simulates a single matchup of the current season. Returns game log as JSON.
Simulates a single play of a matchup. Returns game log as JSON if the
game finished on this play, or undefined if still in progress.
Returns a team's total championship appearances.
Returns a team's total championship wins.
Returns all matchups for a team across all seasons as JSON.
Returns a team's all-time playoff record as JSON.
Returns all matchups for a team in a specific season as JSON.
Serializes the league to a JSON-compatible JS value.
Staticfrom
A WASM-friendly wrapper around
League.