UNPKG

@caveworld/honeycomb-grid

Version:
18 lines (17 loc) 597 B
import { CompassDirection } from '../../compass'; import { Hex, HexCoordinates } from '../../hex'; import { Traverser } from '../types'; export declare function line<T extends Hex>(options: LineAsVectorOptions): Traverser<T>; export declare function line<T extends Hex>(options: LineBetweenOptions): Traverser<T>; export interface LineAsVectorOptions { start?: HexCoordinates; direction: CompassDirection; length: number; } export interface LineBetweenOptions { start?: HexCoordinates; /** * These coordinates are included in the line. */ stop: HexCoordinates; }