@gamepark/rules-api
Version:
API to implement the rules of a board game
10 lines • 362 B
JavaScript
/**
* Type guard for games with hidden information
* @param rules Rules of the game
* @returns true if the game implements {@link HiddenInformation}
*/
export function hasHiddenInformation(rules) {
const test = rules;
return typeof test.getView === 'function' && typeof test.getMoveView === 'function';
}
//# sourceMappingURL=HiddenInformation.js.map