import type { Unit } from "../units.ts"; import { type LeagueBase } from "./types.ts"; /** The small marks the NBA's court diagram has along the lane and the sidelines, drawn in the full detail. Lengths. */ export interface CourtMarks { /** The marks that divide the free-throw lane, from the baseline. The first is the block. */ lane: number[]; /** The lower defensive box's marks: from the lane, from the baseline, and how long; or none. */ box: { fromLane: number; fromBaseline: number; length: number; } | null; /** The marks 28 feet from the baseline on the sidelines: where, and how long. */ sideline: { fromBaseline: number; length: number; }; /** The substitution marks, either side of the half-court line, or none. */ substitution: number | null; } /** The figures of a basketball court. Lengths, in the unit of the table they are in. */ export interface CourtFigures { /** Baseline to baseline, inside the lines. */ length: number; /** Sideline to sideline, inside the lines. */ width: number; /** The free-throw lane (restricted area), side to side. */ laneWidth: number; /** A lane that is wider at the baseline than at the free-throw line (a trapezoid): its width at the baseline. */ laneEndWidth?: number; /** The free-throw line, from the baseline. */ freeThrowLine: number; freeThrowRadius: number; centreRadius: number; /** The inner circle at centre court, or none. */ centreInnerRadius: number | null; /** * The three-point line: the arc's radius from the middle of the basket, to the outside of the line, and how far from each * sideline the straight lines stand. `null` for no line. */ threePoint: { radius: number; sideInset: number; } | null; /** The middle of the basket, from the baseline. */ basket: number; backboard: { width: number; fromBaseline: number; }; /** The ring's radius. */ rim: number; /** The restricted (no-charge) area's radius from the middle of the basket, or none. */ restricted: number | null; /** The small marks of the NBA's diagram, or none. */ marks: CourtMarks | null; } /** A basketball court, as the drawing wants it: the figures with every length in feet. */ export type CourtSpec = CourtFigures; /** A court's figures in feet, from the unit its rulebook gives them in. */ export declare const courtInFeet: (figures: CourtFigures, unit: Unit) => CourtSpec; /** The NBA court today, from `NBA` (geometry.ts). Rule 1 of the NBA rulebook. */ export declare const NBA_COURT: CourtFigures; /** A league with a basketball court of its own. */ export type BasketballLeague = LeagueBase<"basketball", CourtFigures>; /** The basketball leagues, the NBA first. */ export declare const BASKETBALL_LEAGUES: readonly BasketballLeague[];