@gamepark/rules-api
Version:
API to implement the rules of a board game
23 lines (22 loc) • 527 B
TypeScript
/**
* Type for any object with XY number coordinates
*/
export type XYCoordinates = {
x: number;
y: number;
};
/**
* Type guard to know if we have an object with XY coordinates
* @param coordinates The object
* @returns true if coordinates is a {@link XYCoordinates}
*/
export declare const isXYCoordinates: (coordinates: any) => coordinates is XYCoordinates;
/**
* Boundaries for a two dimension grid
*/
export type GridBoundaries = {
xMin: number;
xMax: number;
yMin: number;
yMax: number;
};