frontend
    Preparing search index...

    Function usePyramidGame

    • Hook that manages Pyramid game state, card selection, hints, and removal actions.

      Returns {
          error: string | null;
          exec: (
              ...args: [
                  command: | "reset"
                  | "log"
                  | "draw"
                  | "hint"
                  | "giveup"
                  | "undo"
                  | "remove",
                  card1?: PyramidRemoveCard,
                  card2?: PyramidRemoveCard,
              ],
          ) => Promise<void>;
          handleDraw: () => void;
          handleGiveUp: () => void;
          handleHint: () => Promise<void>;
          handleReset: () => void;
          handleSelectCard: (sel: PyramidSelection, cardValue?: number) => void;
          handleUndo: () => void;
          hint: PyramidHint | null;
          hintError: string | null;
          loading: boolean;
          retry: () => Promise<void>;
          selectedCard: PyramidSelection | null;
          state: PyramidResponse | null;
      }