UNPKG

@gamepark/rules-api

Version:

API to implement the rules of a board game

10 lines 305 B
/** * Type guard for rules with Random moves * @param rules The game's rules * @return true if the rules implements {@link RandomMove} interface */ export function hasRandomMove(rules) { const test = rules; return typeof test.randomize === 'function'; } //# sourceMappingURL=random.util.js.map