import { IBooleanConditional, IMathConditional, IResolveConditional } from './conditional'; import { IDeckConfig } from './deck-config'; export declare type IValidHandSetStruct = { kind: 'set'; count: number; allowMore?: boolean; }; /** * Straight hand struct * count must be >= 2 */ export declare type IValidHandStraightStruct = { kind: 'straight'; count: number; allowMore?: boolean; flush?: boolean; }; export declare type IValidHandStruct = IValidHandSetStruct | IValidHandStraightStruct; export declare type IValidHands = 'poker' | 'any' | number | IValidHandStruct; export declare type INextDirection = 'clockwise' | 'counter-clockwise' | 'left' | 'right' | 'across' | 'none'; /** * Support face down cards on table / collection * Support claiming colleted count with guards and turn order for claiming */ export declare type IPlayTarget = 'table' | 'collection' | 'other-collection'; export interface IRoundPlayCanConditions { canCall?: boolean | IBooleanConditional; canSkip?: boolean | IBooleanConditional; canDraw?: boolean | IBooleanConditional; canPlay?: boolean | IBooleanConditional; canPass?: boolean | IBooleanConditional; canPlace?: boolean | IBooleanConditional; canDiscard?: boolean | IBooleanConditional; canPlayAfterSkip?: boolean | IBooleanConditional; } export interface IRoundPlayConditions extends IRoundPlayCanConditions { hands: Array; guards?: IBooleanConditional; } export declare type IPlayerContextValue = string | number | boolean; export interface IPlayerContext { [key: string]: IPlayerContextValue; } export interface ISubRoundsConfig { firstPlayerConditions?: IBooleanConditional; firstPlayerPlayConditions?: IRoundPlayConditions; nextPlayer: { direction?: INextDirection; guards?: IBooleanConditional; }; playerPlayConditions: IRoundPlayConditions; winConditions: IBooleanConditional; completeConditions: IBooleanConditional; place?: { guards?: IBooleanConditional; }; play?: { target?: Array; }; collectionVisible?: boolean; } /** * Intermediary type for ordered entries with fallback (*) * * even and odd bot yet supported */ export declare type OrderEntryConfig = { '*'?: T; odd?: T; even?: T; [key: string]: T | undefined; }; export interface IRoundsConfig extends ISubRoundsConfig { newDeck?: boolean | IBooleanConditional; passCards?: { order: OrderEntryConfig; loopOrder?: boolean; count: number; }; deal?: 'all' | { order: OrderEntryConfig<{ perPerson?: IMathConditional | number; toTable?: IMathConditional | number; }>; }; discard?: { count: number; }; call?: { count: number; guards?: IBooleanConditional; countFromDeck?: number; }; draw?: { count: number; target?: Array<'deck' | 'discard'>; }; defaultPlayerContext?: IPlayerContext; subRounds?: { order: OrderEntryConfig; }; } export interface IGameConfig { playerCount: { min: number; max: number; }; deck?: { count?: number | IMathConditional; } & IDeckConfig; nextDealer?: INextDirection; customValues?: { [key: string]: IResolveConditional; }; phases: { order: Array<'play' | 'discard' | 'draw'>; canSkipToLast?: boolean; }; rounds: { order: OrderEntryConfig; }; useSubRounds?: boolean; defaultPlayerContext?: IPlayerContext; roundPointCalculation?: IMathConditional; winConditions: IBooleanConditional; completeConditions: IBooleanConditional; } //# sourceMappingURL=game-config.d.ts.map