frontend
    Preparing search index...

    Function useDoubtGame

    • Hook that manages Doubt game state, countdown timer, and player actions.

      Returns {
          claimedValue: number;
          clearSelection: () => void;
          countdown: number | null;
          doubtConfig: DoubtConfig;
          error: string | null;
          exec: (
              ...args: [
                  command: "reset"
                  | "play"
                  | "doubt"
                  | "skip",
                  cardIndices?: number[],
                  claimedValue?: number,
                  doubterIndices?: number[],
                  config?: DoubtConfig,
                  humanPlayMs?: number,
                  profile?: unknown,
              ],
          ) => Promise<void>;
          handleConfigChange: (key: NumberKeys<DoubtConfig>, value: string) => void;
          handleConfigToggle: (key: BooleanKeys<DoubtConfig>, value: boolean) => void;
          handleCpuDoubtConfirm: () => void;
          handleDoubt: () => void;
          handlePlay: () => void;
          handleSkip: () => void;
          loading: boolean;
          retry: () => Promise<void>;
          selectedCardIndices: number[];
          setClaimedValue: Dispatch<SetStateAction<number>>;
          state: DoubtResponse | null;
          stopCountdown: () => void;
          toggleCard: (idx: number) => void;
      }