import type { Cell, GameSettings, Point, Stone } from "../types.ts"; /** * Quadrant rotation. The board is divided into equal square quadrants, and a * turn ends by turning one of them a quarter. Quadrants are numbered * row-major from the top left: on a 6×6 board of 3×3 quadrants, 0 is top * left, 1 top right, 2 bottom left, 3 bottom right. */ /** The top-left corner of quadrant `quadrant`. * * @param size - The number of cells on each side of the board. * @param quadrantSize - The number of cells on each side of a quadrant. * @param quadrant - The zero-based quadrant index. * @returns The top-left corner of quadrant `quadrant`. * @example * ```ts * import { quadrantOrigin } from "@johnmorrisdotca/narabe"; * * console.log(quadrantOrigin(6,3,1)); * ``` */ export declare function quadrantOrigin(size: number, quadrantSize: number, quadrant: number): Point; /** How many quadrants a board of this size holds. * * @param size - The number of cells on each side of the board. * @param quadrantSize - The number of cells on each side of a quadrant. * @returns How many quadrants a board of this size holds. * @example * ```ts * import { quadrantCount } from "@johnmorrisdotca/narabe"; * * console.log(quadrantCount(6,3)); * ``` */ export declare function quadrantCount(size: number, quadrantSize: number): number; /** * The board with one quadrant turned a quarter. Every cell in the quadrant * moves; nothing outside it does. Rotating a quadrant that is symmetrical * under the turn leaves the board equal, which the rules still count as a * turn taken. */ export declare function rotateQuadrant(board: Cell[], size: number, quadrantSize: number, quadrant: number, clockwise: boolean): Cell[]; /** * Every winning line on the board, by colour. A rotation can complete a line * anywhere, for either player, so after one the whole board is read rather * than the lines through a single point. Each colour reports at most one line. */ export declare function findAllWins(board: Cell[], settings: GameSettings): Record; /** Whether a stone of `stone` sits anywhere on the board. */ export declare function hasStones(board: Cell[], stone: Stone): boolean; export declare const BOTH_STONES: readonly Stone[];