UNPKG

@gamepark/rules-api

Version:

API to implement the rules of a board game

9 lines 371 B
/** * 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 const isXYCoordinates = (coordinates) => { return typeof coordinates === 'object' && typeof coordinates.x === 'number' && typeof coordinates.y === 'number'; }; //# sourceMappingURL=grid.util.js.map