frontend
    Preparing search index...

    Function useBridgeGame

    • Hook that manages Bridge game state, bidding, and player actions.

      Returns {
          apiExec: (
              ...args: [
                  command: | "reset"
                  | "log"
                  | "play"
                  | "next"
                  | "nextround"
                  | "hint"
                  | "bid",
                  cardIndex?: number,
                  bidType?: number,
                  bidLevel?: number,
                  bidSuit?: number,
                  config?: BridgeConfigInput,
              ],
          ) => Promise<void>;
          bridgeConfig: BridgeConfig;
          clearSelection: () => void;
          error: string | null;
          handleBid: (bidType: number, bidLevel?: number, bidSuit?: number) => void;
          handleConfigChange: (key: "cpuDifficulty", value: string) => void;
          handleHint: () => Promise<void>;
          handleNextRound: () => void;
          handleNextTrick: () => void;
          handlePlay: () => void;
          hint: BridgeHint | null;
          hintError: string | null;
          hintLoading: boolean;
          loading: boolean;
          retry: () => Promise<void>;
          selectedCardIndices: number[];
          state: BridgeResponse | null;
          toggleCard: (idx: number) => void;
      }