@gamepark/rules-api
Version:
API to implement the rules of a board game
14 lines • 522 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.hasHiddenInformation = void 0;
/**
* Type guard for games with hidden information
* @param rules Rules of the game
* @returns true if the game implements {@link HiddenInformation}
*/
function hasHiddenInformation(rules) {
var test = rules;
return typeof test.getView === 'function' && typeof test.getMoveView === 'function';
}
exports.hasHiddenInformation = hasHiddenInformation;
//# sourceMappingURL=HiddenInformation.js.map