import { type FencePoint } from "../geometry.ts"; import type { Fence } from "../types.ts"; import type { Unit } from "../units.ts"; import { type LeagueBase } from "./types.ts"; /** The figures of a diamond. Lengths, in the unit of the table they are in. */ export interface DiamondFigures { /** The distance between bases (the side of the square). */ base: number; /** The side of a base. */ baseSize: number; /** The front of the pitcher's plate, from the back point of home plate. */ pitcher: number; /** The pitcher's plate: how long (across) and how deep. */ pitchersPlate: { width: number; depth: number; }; /** The mound's radius, or a softball pitcher's circle's. */ moundRadius: number; /** The middle of the mound or the circle, from the back point of home plate. */ moundCentre: number; /** The dirt of the infield is cut by an arc of this radius round the pitcher's plate, or the rules give none. */ skinRadius: number | null; /** Home plate: its width, and the length of its two parallel sides. */ plate: { width: number; side: number; }; /** The batter's boxes, or none given. */ boxes: { batterWidth: number; batterLength: number; gap: number; } | null; /** The three-foot lane for the batter-runner: where it begins on the line to first, and how wide; or none given. */ runningLane: { from: number; width: number; } | null; /** The least distance from home plate to the backstop. */ backstop: number; /** The fence, at the places the rules give a distance for: what they recommend or require (the least of a range). */ fence: Partial; } /** A diamond as the drawing wants it: the figures with every length in feet. */ export type DiamondSpec = DiamondFigures; /** A diamond's figures in feet, from the unit its rulebook gives them in. */ export declare const diamondInFeet: (figures: DiamondFigures, unit: Unit) => DiamondSpec; /** The baseball field of the Official Baseball Rules, from `MLB` (geometry.ts). */ export declare const MLB_DIAMOND: DiamondFigures; /** A diamond's default fence as points: through the distances the rules give, and no others. */ export declare function diamondFence(diamond: DiamondSpec): FencePoint[]; /** A league with a diamond of its own. */ export type BaseballLeague = LeagueBase<"baseball", DiamondFigures> & { game: "baseball" | "softball"; }; /** The baseball and softball leagues, MLB first. */ export declare const BASEBALL_LEAGUES: readonly BaseballLeague[];