import type { RingFigures } from "../leagues/combat.ts"; import { type MBox, type MMark, type Parts } from "./parts.ts"; /** The colour of a corner's post and pad: the red and the blue corner of the two boxers, and two neutral ones in white. */ export type CornerColour = "red" | "blue" | "white"; /** One corner of the ring: its post's place on the platform, the corner of the rope square its ropes turn at, its colour and which of the four it is (0 top left, clockwise). */ export interface RingCorner { index: number; colour: CornerColour; post: [number, number]; rope: [number, number]; } /** A set of steps: the box it covers outside the platform's edge, and the edge it is on. */ export interface RingSteps { edge: "north" | "south"; corner: number; box: MBox; } /** What a ring plan is. */ export interface RingLayout { parts: Parts; /** The platform, which is the surface's own box: the canvas inside the ropes and the apron round it. */ platform: MBox; extent: MBox; centre: [number, number]; /** The ring inside the ropes, and its side. */ ring: MBox; size: number; /** The apron's width as drawn, from the ropes to the platform's edge. */ apron: number; corners: RingCorner[]; steps: RingSteps[]; /** The platform's height over the floor of the building, in metres. */ height: number; marks: MMark[]; ranges: Record; } /** The size the options ask for, held to what the rules allow. */ export declare const ringSize: (asked: number | undefined, fig: RingFigures, rule: string) => number; /** The platform's height the options ask for, held to what the rules allow. */ export declare const ringHeight: (asked: number | undefined, fig: RingFigures, rule: string) => number; /** The plan of the ring the options ask for. */ export declare function ringParts(fig: RingFigures, o: { size: number; height: number; steps: boolean; corners: boolean; }): RingLayout;