@gamepark/rules-api
Version:
API to implement the rules of a board game
15 lines • 415 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasUndo = void 0;
/**
* Type guard to know if a game implements the Undo feature.
*
* @param rules Rules of the game
* @returns true if rules implements {@link Undo}
*/
function hasUndo(rules) {
var test = rules;
return typeof test.canUndo === 'function';
}
exports.hasUndo = hasUndo;
//# sourceMappingURL=Undo.js.map