UNPKG

@gamepark/rules-api

Version:

API to implement the rules of a board game

9 lines (8 loc) 416 B
import { RandomMove } from '../RandomMove'; import { Rules } from '../Rules'; /** * Type guard for rules with Random moves * @param rules The game's rules * @return true if the rules implements {@link RandomMove} interface */ export declare function hasRandomMove<Game, Move, RandomizedMove, PlayerId>(rules: Rules<Game, Move, PlayerId>): rules is Rules<Game, Move> & RandomMove<Move, RandomizedMove, PlayerId>;