frontend
    Preparing search index...

    Function useDaifugoGame

    • Hook that manages Daifugo game state, card selection, and CPU replay.

      Returns {
          clearSelection: () => void;
          configInput: DaifugoConfig;
          error: string | null;
          exec: (
              ...args: [
                  command: "sort"
                  | "reset"
                  | "play",
                  indices?: number[],
                  config?: DaifugoConfig,
                  sortMode?: number,
              ],
          ) => Promise<void>;
          handleConfigChange: (
              key: keyof DaifugoConfig,
              value: number | boolean,
          ) => void;
          handleDragCard: (idx: number) => void;
          handleDrop: (e: DragEvent) => void;
          loading: boolean;
          retry: () => Promise<void>;
          selectedIndices: number[];
          state: DaifugoResponse | null;
          toggleCardSelection: (idx: number) => void;
      }