import { DominoValue } from '../game/DominoValue'; import { DOMINO_HEIGHT, DOMINO_WIDTH } from './trainLayout'; export type LineEndId = 'left' | 'right' | 'top' | 'bottom'; /** Degrees: 0 = +x (right), 90 = +y (down). */ export declare const LINE_END_ANGLES: Readonly>; export interface LineArmData { readonly end: LineEndId; readonly dominoes: readonly DominoValue[]; } export interface ComputeLineLayoutInput { readonly centerX: number; readonly centerY: number; /** Spinner or seed tile at the center (null = empty board). */ readonly center: DominoValue | null; readonly arms: readonly LineArmData[]; /** * Extra gap between the center tile's outer edge and the first arm tile. * Default 0 so arm tiles abut the spinner/seed. */ readonly startGap?: number; } export interface LineArmPlacement { readonly end: LineEndId; /** Train origin — same as the center tile's center (DominoTrain leadGap reaches out). */ readonly startX: number; readonly startY: number; readonly angle: number; /** * Distance from (startX, startY) to the center of the first arm tile so that * tile's near edge touches the center tile (plus optional startGap). */ readonly leadGap: number; readonly dominoes: readonly DominoValue[]; /** Hit-target / play-button anchor for this end. */ readonly highlightX: number; readonly highlightY: number; } export interface LineLayoutResult { readonly centerX: number; readonly centerY: number; readonly center: DominoValue | null; readonly arms: readonly LineArmPlacement[]; readonly width: number; readonly height: number; } /** * Half-extent of the center tile along a cardinal arm. * Spinner (double) is rendered upright; seed (non-double) is rendered on its side. */ export declare function centerHalfExtentAlongEnd(end: LineEndId, center: DominoValue | null): number; /** * Place a classic spinner (or seed) at center with four cardinal arm starts. * Arm geometry is consumed by DominoTrain (same as Mexican Train spokes). * * Train origins sit at the center; `leadGap` is sized so the first arm tile * abuts the center tile (zero default gap). */ export declare function computeLineLayout(input: ComputeLineLayoutInput): LineLayoutResult; export { DOMINO_WIDTH, DOMINO_HEIGHT };