private static List <Competition> Simulate(ICompetitionService competitionService) { var rankingHistory = new List <Competition>(); bool runAgain; var stopwatch = new Stopwatch(); do { var numberOfSimulations = GetNumberOfSimulations(); stopwatch.Start(); for (var i = 0; i < numberOfSimulations; i++) { _logger.LogInformation(new string('-', 80)); var competition = competitionService.CreateCompetition($"Eredivisie {DateTime.Now}"); competitionService.SimulateMatches(competition); competitionService.LogStats(competition); rankingHistory.Add(competition); } stopwatch.Stop(); _logger.LogInformation($"It took me {stopwatch.ElapsedMilliseconds} ms. to simulate."); Console.Write("Again? [y] [n] "); runAgain = Console.ReadKey().KeyChar == 'y'; Console.WriteLine(); } while (runAgain); Console.WriteLine($"{rankingHistory.Count} took me {stopwatch.ElapsedMilliseconds} ms."); return(rankingHistory); }