UNPKG

@gamepark/rules-api

Version:

API to implement the rules of a board game

6 lines (5 loc) 492 B
import { Action } from '../Action'; import { Rules } from '../Rules'; export declare function playAction<Game, Move, PlayerId>(rules: Rules<Game, Move, PlayerId>, move: Move, playerId: PlayerId): Action<Move, PlayerId>; export declare function replayAction<Game, Move, PlayerId>(rules: Rules<Game, Move, PlayerId>, action: Action<Move, PlayerId>): void; export declare function replayActions<Game, Move, PlayerId>(rules: Rules<Game, Move, PlayerId>, actions: Action<Move, PlayerId>[]): void;