/** * How a played double must be answered before play continues. * - `none`: doubles are ordinary tiles. * - `cover`: the double must be answered by one tile on its open end. * - `chicken-foot`: the double must grow a full foot (`chickenFoot.toeCount` * answers: the straight center continuation plus the angled side toes). */ export type DoubleObligation = 'none' | 'cover' | 'chicken-foot'; export interface ChickenFootConfig { /** * Total toes a double must grow to be satisfied, counting the straight center * continuation as one. Stays 3 by default (center + two ±angle side toes). */ toeCount: number; /** Angles (degrees, relative to the train) of the side toes (toeCount - 1). */ sideToeAngles: number[]; } /** * Every knob that governs legal play. Pass a partial override to {@link resolveRules} * to get a fully-populated config; unspecified fields fall back to DEFAULT_RULES. */ export interface RulesConfig { /** Highest pip value in the set (12 → double-12, 18 → double-18, 91 / 190 tiles). */ maxPips: number; /** Value of the starting engine double (defaults to maxPips). */ engineValue: number; /** Forbid a double immediately following a double in a chain. */ allowConsecutiveDoubles: boolean; /** Each physical tile may be placed at most once across all play. */ requireUniqueTiles: boolean; /** A tile may only attach where one of its ends matches the open value. */ requireSequential: boolean; /** Obligation imposed by playing a double. */ doubleObligation: DoubleObligation; chickenFoot: ChickenFootConfig; } export declare const DEFAULT_RULES: RulesConfig; /** Number of answers a double needs to be satisfied under the given rules. */ export declare function requiredDoubleAnswers(config: RulesConfig): number; /** Number of angled side-toe slots a double exposes (center is the main line). */ export declare function sideToeSlots(config: RulesConfig): number; /** Fills in any missing fields from DEFAULT_RULES (engineValue tracks maxPips). */ export declare function resolveRules(overrides?: Partial): RulesConfig;