UNPKG

gridboard

Version:

A Grid-Based Games Framework For TypeScript/JavaScript

11 lines (10 loc) 466 B
export declare type Coordinate = [number, number] | readonly [number, number]; export declare type CoordinateConvert = (x: number, y: number) => Coordinate; export interface CoordinateConverter { convertAbsoluteCoordinate(x: number, y: number): Coordinate; convertRelativeCoordinate(dx: number, dy: number): Coordinate; } export interface DirectionParser { [codes: string]: Coordinate; (codes: string | TemplateStringsArray): Coordinate; }