Interface StoreContainer<StateType, ActionType, HiddenType>

Represents a container for managing a store and handling actions within a game or application.

The validation object for the current player.

The action to be processed, which can be of type ActionType or StandardGameAction.

A random generator instance used for randomness in the action.

Optional hidden objects of type IHiddenObjects<HiddenType>.

interface StoreContainer<StateType, ActionType, HiddenType = any> {
    reducer: (
        ctx: Context<HiddenType>,
        action: NewGameAction | ActionType,
    ) => void;
    store: Store<StateType>;
}

Type Parameters

  • StateType

    The type representing the state managed by the store.

  • ActionType

    The type representing the actions that can be dispatched.

  • HiddenType = any

    The type representing hidden objects, defaults to any.

Properties

Properties

reducer: (ctx: Context<HiddenType>, action: NewGameAction | ActionType) => void

The store instance that manages the application state.