public void ChangeStrategyTest()
        {
            var sw = new Stopwatch();

            sw.Start();

            var result = simulationService_.Simulate(1000000000, true);

            Assert.Equal(67, Math.Round(result * 100));

            sw.Stop();
            testOutputHelper_.WriteLine("Elapsed={0}", sw.Elapsed);
        }
Esempio n. 2
0
        public SimulationResult Execute([FromBody] SimulationParameters parameters)
        {
            var winRate = simulationService_.Simulate(
                parameters.NumberOfGames,
                parameters.IsChangeStrategy);

            return(new SimulationResult
            {
                WinRate = winRate
            });
        }
Esempio n. 3
0
 public ActionResult <SimulationResponseModel> Simulate(SimulationRequestModel simulationModelRequest)
 {
     return(simulationService.Simulate(simulationModelRequest.ProjectId, simulationModelRequest.ResourceId,
                                       simulationModelRequest.StatisticalEngineId, simulationModelRequest.CreatedBy));
 }