frontend
    Preparing search index...

    Function useOldMaidGame

    • Hook that manages Old Maid game state, setup, CPU replay, and card reveal.

      Returns {
          displayState: OldMaidResponse | null;
          error: string | null;
          gameExec: (
              ...args: [
                  command: "shuffle"
                  | "reset"
                  | "draw"
                  | "reorder",
                  drawIdx?: number,
                  mode?: number,
                  cpuPlacementStrategy?: boolean,
                  reorderIndices?: number[],
                  cpuMemoryAI?: boolean,
                  cpuHesitationEnabled?: boolean,
                  cpuMetaAI?: boolean,
                  profile?: unknown,
              ],
          ) => Promise<void>;
          gameSettings:
              | {
                  cpuHesitationEnabled: boolean;
                  cpuMemoryAI: boolean;
                  cpuMetaAI: boolean;
                  cpuPlacementStrategy: boolean;
                  mode: number;
              }
              | null;
          handleReorder: (indices: number[]) => void;
          handleReset: () => void;
          handleStart: () => void;
          loading: boolean;
          retry: () => Promise<void>;
          revealedCard: Card | null;
          setSetupHesitation: Dispatch<SetStateAction<boolean>>;
          setSetupMemoryAI: Dispatch<SetStateAction<boolean>>;
          setSetupMetaAI: Dispatch<SetStateAction<boolean>>;
          setSetupMode: Dispatch<SetStateAction<number>>;
          setSetupStrategy: Dispatch<SetStateAction<boolean>>;
          setSuspectPins: Dispatch<SetStateAction<Set<number>>>;
          setupHesitation: boolean;
          setupMemoryAI: boolean;
          setupMetaAI: boolean;
          setupMode: number;
          setupStrategy: boolean;
          shakeKey: number;
          suspectPins: Set<number>;
      }