/// <summary> /// Facilitates the game of Tic Tac Toe by accepting a JSON input representing /// the human player's move and returning a JSON object with Azure's move /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The input payload representing human player's move. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> ExecuteMoveResponseAsync(this IRestClientSDKLibraryClient operations, ExecuteMove body = default(ExecuteMove), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ExecuteMoveResponseWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Provides an AI-generated optimal countermove to a tic-tac-toe game state /// by using minimax. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <object> ProcessComplexInputAsync(this IRestClientSDKLibraryClient operations, InputPayload body = default(InputPayload), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ProcessComplexInputWithHttpMessagesAsync(body, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Facilitates the game of Tic Tac Toe by accepting a JSON input representing /// the human player's move and returning a JSON object with Azure's move /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// The input payload representing human player's move. /// </param> public static object ExecuteMoveResponse(this IRestClientSDKLibraryClient operations, ExecuteMove body = default(ExecuteMove)) { return(Task.Factory.StartNew(s => ((IRestClientSDKLibraryClient)s).ExecuteMoveResponseAsync(body), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }
/// <summary> /// Provides an AI-generated optimal countermove to a tic-tac-toe game state /// by using minimax. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='body'> /// </param> public static object ProcessComplexInput(this IRestClientSDKLibraryClient operations, InputPayload body = default(InputPayload)) { return(Task.Factory.StartNew(s => ((IRestClientSDKLibraryClient)s).ProcessComplexInputAsync(body), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult()); }