frontend
    Preparing search index...

    Function useCribbageGame

    • Hook that manages Cribbage game state and player actions.

      Returns {
          clearSelection: () => void;
          cribbageConfig: CribbageConfig;
          error: string | null;
          exec: (
              ...args: [
                  command: | "reset"
                  | "log"
                  | "discard"
                  | "nextround"
                  | "peg"
                  | "go"
                  | "shownext",
                  cardIndex?: number,
                  cardIndices?: number[],
                  config?: CribbageConfigInput,
              ],
          ) => Promise<void>;
          handleConfigChange: (
              key: NumberKeys<CribbageConfig>,
              value: string,
          ) => void;
          handleDiscard: () => void;
          handleGo: () => void;
          handleNextRound: () => void;
          handlePeg: () => void;
          handleShowNext: () => void;
          loading: boolean;
          retry: () => Promise<void>;
          selectedCardIndices: number[];
          state: CribbageResponse | null;
          toggleCard: (idx: number) => void;
      }