@gamepark/rules-api
Version:
API to implement the rules of a board game
13 lines • 522 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isXYCoordinates = void 0;
/**
* Type guard to know if we have an object with XY coordinates
* @param coordinates The object
* @returns true if coordinates is a {@link XYCoordinates}
*/
var isXYCoordinates = function (coordinates) {
return typeof coordinates === 'object' && typeof coordinates.x === 'number' && typeof coordinates.y === 'number';
};
exports.isXYCoordinates = isXYCoordinates;
//# sourceMappingURL=grid.util.js.map