frontend
    Preparing search index...

    Interface TrickGameBaseOptions<TState, TArgs, TConfig, THint>

    Options passed to useTrickGameBase to configure the base trick-taking game hook.

    interface TrickGameBaseOptions<
        TState,
        TArgs extends unknown[],
        TConfig extends object,
        THint,
    > {
        apiFn: (...args: TArgs) => Promise<TState>;
        defaultConfig: TConfig;
        getHint: (state: TState) => THint | null | undefined;
    }

    Type Parameters

    • TState

      The game state type returned by the API.

    • TArgs extends unknown[]

      The tuple of argument types accepted by the API exec function.

    • TConfig extends object

      The game configuration type.

    • THint

      The hint type embedded in the game state.

    Index

    Properties

    apiFn: (...args: TArgs) => Promise<TState>

    The API exec function used to dispatch commands.

    defaultConfig: TConfig

    The default game configuration applied on reset.

    getHint: (state: TState) => THint | null | undefined

    Extracts the hint from the game state, or returns null/undefined if absent.