frontend
    Preparing search index...

    Function usePinochleGame

    • Hook that manages Pinochle game state and player actions.

      Returns {
          error: string | null;
          exec: (
              ...args: [
                  command: | "reset"
                  | "log"
                  | "play"
                  | "pass"
                  | "next"
                  | "nextround"
                  | "hint"
                  | "bid"
                  | "meld"
                  | "trump",
                  cardIndex?: number,
                  config?: PinochleConfigInput,
                  bidAmount?: number,
                  suit?: number,
              ],
          ) => Promise<void>;
          handleBid: (amount: number) => void;
          handleCallTrump: (suit: number) => void;
          handleConfigChange: (
              key: NumberKeys<PinochleConfig>,
              value: string,
          ) => void;
          handleConfirmMelds: () => void;
          handleHint: () => void;
          handleNextRound: () => void;
          handleNextTrick: () => void;
          handlePass: () => void;
          handlePlay: (cardIndex: number) => void;
          handleReset: () => void;
          loading: boolean;
          pinochleConfig: PinochleConfig;
          retry: () => Promise<void>;
          state: PinochleResponse | null;
      }