Esempio n. 1
0
        public async Task <ActionResult <Simulation> > CreateSimulation(int numberOfRounds, bool changeDoor)
        {
            try
            {
                var simulation = await _simulationService.CreateSimulation(numberOfRounds, changeDoor);

                return(Created("Created", simulation));
            }
            catch (ArgumentException ae)
            {
                return(BadRequest(ae.Message));
            }
            catch (Exception e)
            {
                return(StatusCode(500, e.Message));

                Console.WriteLine(e);
                throw;
            }
        }