import type { RuleVariant, VariantSpec } from "./types.ts"; /** * Every rule set, as data. The engine reads these and never the variant name, * so a new variant is a new row here plus its copy in `variants.constants.ts`. * * @example * ```ts * import { VARIANT_SPECS } from "@johnmorrisdotca/narabe"; * console.log(VARIANT_SPECS); * ``` */ export declare const VARIANT_SPECS: Record; /** The board sizes a variant plays on, smallest first — the order they are drawn in. * * @param variant - The native rule variant identifier. * @returns The board sizes a variant plays on, smallest first — the order they are drawn in. * @example * ```ts * import { boardSizesFor } from "@johnmorrisdotca/narabe"; * * console.log(boardSizesFor("go")); * ``` */ export declare function boardSizesFor(variant: RuleVariant): readonly number[]; /** * The board a game OPENS on, where nothing else has said: its own * `defaultBoard` if it has one, else the first of its boards. * * Asked for by name rather than read off the front of the list, because the * list is in numerical order and the two facts had been the same number by * accident. Sorting the lists moved Halma's default from its own sixteen to * the quick eight and Honeycomb's from the 91-cell board to the 37, and * nothing would have said so. * * @param variant - The native rule variant identifier. * @returns The board a game OPENS on, where nothing else has said: its own `defaultBoard` if it has one, else the first of its boards. Asked for by name rather than read off the front of the list, because the list is in numerical order and the two facts had been the same number by accident. Sorting the lists moved Halma's default from its own sixteen to the quick eight and Honeycomb's from the 91-cell board to the 37, and nothing would have said so. * @example * ```ts * import { defaultBoardFor } from "@johnmorrisdotca/narabe"; * * console.log(defaultBoardFor("reversi")); * ``` */ export declare function defaultBoardFor(variant: RuleVariant): number; /** * The board this variant will actually be played on, given a size somebody * asked for. A game with a board of its own gets that board. * * `normaliseSettings` has always done this when it builds a state, so the * board a player sees was never wrong. What could be wrong was the row: a * Reversi game could be stored at 19×19, shown as 19×19 on its page and in * its record, and played on the 8×8 board Reversi actually has. Anything * writing a size to the database asks here first, so the row and the board * cannot disagree. * * @param variant - The native rule variant identifier. * @param size - The number of cells on each side of the board. * @returns The supported board size resolved for the variant and requested side length. * @example * ```ts * import { sizeForVariant } from "@johnmorrisdotca/narabe"; * * console.log(sizeForVariant("checkers",15)); * ``` */ export declare function sizeForVariant(variant: RuleVariant, size: number): number;