示例#1
0
        private static void SimulateGameweek(Season season, int gameweekNumber)
        {
            var fixtures = FixtureRepository.GetAllFixtures(season, gameweekNumber);
            var teams    = TeamRepository.GetAllTeams(season);

            foreach (var predictionStrategy in PredictionStrategies.Where(ps => ps.CanPredict(season)))
            {
                Console.WriteLine(predictionStrategy.Name);

                foreach (var fixture in fixtures)
                {
                    var homeTeam = teams[fixture.HomeTeamId];
                    var awayTeam = teams[fixture.AwayTeamId];

                    var predicted = predictionStrategy.PredictScore(fixture, season);

                    Console.WriteLine($"{homeTeam.ShortName} {Display.Score(predicted)} {awayTeam.ShortName}");
                }

                Console.WriteLine();
            }
        }