export type Tile = readonly [number, number]; /** Maps abstract `[col, row]` tiles onto world-space `[x, z]`, mirroring `navGrid`'s bounds+cellSize convention. */ export interface TacticalGridWorldConfig { /** World-space `[x, z]` of the min corner of tile `[0, 0]`. */ origin: readonly [number, number]; tileSize: number; } export interface TacticalGridConfig { width: number; height: number; blocked?: readonly Tile[]; diagonal?: boolean; world?: TacticalGridWorldConfig; } export interface ReachableOptions { passThrough?: readonly string[]; diagonal?: boolean; } export interface ReachableTile { tile: Tile; cost: number; } export type PushObstacle = "wall" | "edge"; export interface PushCollision { mover: string; into: string | PushObstacle; at: Tile; } export interface PushMove { id: string; from: Tile; to: Tile; } export interface PushResult { moves: PushMove[]; collisions: PushCollision[]; } export interface PushOptions { distance?: number; chain?: boolean; } export interface TacticalGridSnapshot { blocked: string[]; occupants: Record; } export interface TacticalGrid { readonly width: number; readonly height: number; inBounds(tile: Tile): boolean; isBlocked(tile: Tile): boolean; setBlocked(tile: Tile, blocked: boolean): void; occupantAt(tile: Tile): string | null; tileOf(id: string): Tile | null; place(id: string, tile: Tile): boolean; remove(id: string): void; move(id: string, tile: Tile): boolean; neighbors(tile: Tile, diagonal?: boolean): Tile[]; reachable(from: Tile, budget: number, options?: ReachableOptions): ReachableTile[]; path(from: Tile, to: Tile, options?: ReachableOptions): Tile[] | null; push(id: string, direction: Tile, options?: PushOptions): PushResult; capture(): TacticalGridSnapshot; restore(snapshot: TacticalGridSnapshot): void; /** World `[x, z]` to the containing tile, or `null` when outside the grid. Requires `config.world`. */ worldToTile(x: number, z: number): Tile | null; /** A tile's world-space center. Requires `config.world`. */ tileToWorld(tile: Tile): readonly [number, number]; } /** @internal */ export declare function createTacticalGrid(config: TacticalGridConfig): TacticalGrid;