Exemple #1
0
        public IEnumerable <Team> Create(int howMany)
        {
            var teams = new List <Team>();

            using (var formationRepository = new RepositoryFactory().CreateFormationRepository())
            {
                var formations = formationRepository.GetAll().ToList();

                for (int i = 0; i < howMany; i++)
                {
                    var team = new Team {
                        Formation = _listRandomizer.GetItem(formations)
                    };
                    teams.Add(team);
                }
            }

            return(teams);
        }
Exemple #2
0
        private PlayerProfile GetRandomPlayerProfile(IEnumerable <PlayerProfile> playerProfiles)
        {
            var randomPlayerProfile = ListRandomizer.GetItem(playerProfiles);

            return(randomPlayerProfile);
        }