frontend
    Preparing search index...

    Function useSpadesGame

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

      Returns {
          clearSelection: () => void;
          error: string | null;
          exec: (
              ...args: [
                  command: "reset"
                  | "play"
                  | "next"
                  | "nextround"
                  | "hint"
                  | "bid",
                  bid?: number,
                  cardIndex?: number,
                  config?: SpadesConfigInput,
              ],
          ) => Promise<void>;
          handleBid: (bid: number) => void;
          handleConfigChange: (key: NumberKeys<SpadesConfig>, value: string) => void;
          handleHint: () => Promise<void>;
          handleNextRound: () => void;
          handleNextTrick: () => void;
          handlePlay: () => void;
          hint: SpadesHint | null;
          hintError: string | null;
          hintLoading: boolean;
          loading: boolean;
          retry: () => Promise<void>;
          selectedCardIndices: number[];
          spadesConfig: SpadesConfig;
          state: SpadesResponse | null;
          toggleCard: (idx: number) => void;
      }