import { CompassDirection } from '../compass'; import { Hex, HexCoordinates, Point } from '../hex'; import { GridAsJSON, Traverser } from './types'; export declare class Grid implements Iterable { #private; static fromIterable(hexes: Iterable): Grid; static fromJSON({ hexSettings, coordinates }: GridAsJSON): Grid; readonly [Symbol.toStringTag] = "Grid"; get size(): number; [Symbol.iterator](): IterableIterator; readonly hexPrototype: T; constructor(hexPrototype: T); constructor(hexPrototype: T, traversers: Traverser | Traverser[]); constructor(hexPrototype: T, hexes: Iterable); constructor(grid: Grid); createHex(coordinates?: HexCoordinates): T; getHex(coordinates: HexCoordinates): T | undefined; hasHex(hex: T): boolean; setHexes(hexes: Iterable): this; filter(predicate: (hex: T) => boolean): Grid; map(fn: (hex: T) => T): Grid; traverse(traversers: Traverser | Traverser[], options?: { bail?: boolean; }): Grid; traverse(hexes: Iterable, options?: { bail?: boolean; }): Grid; traverse(grid: Grid, options?: { bail?: boolean; }): Grid; traverse(input: Traverser | Traverser[] | Iterable | Grid, options?: { bail?: boolean; }): Grid; forEach(fn: (hex: T) => void): this; reduce(reducer: (previousHex: T, currentHex: T) => T): T; reduce(reducer: (previousHex: T, currentHex: T) => T, initialValue: T): T; reduce(reducer: (result: R, hex: T) => R, initialValue: R): R; toArray(): T[]; toJSON(): GridAsJSON; toString(): string; pointToHex(point: Point, options?: { allowOutside: true; }): T; pointToHex(point: Point, options: { allowOutside: false; }): T | null; distance(from: HexCoordinates, to: HexCoordinates, options?: { allowOutside: true; }): number; distance(from: HexCoordinates, to: HexCoordinates, options: { allowOutside: false; }): number | null; neighborOf(hex: T, direction: CompassDirection, options?: { allowOutside: true; }): T; neighborOf(hex: T, direction: CompassDirection, options: { allowOutside: false; }): T | null; }