Example #1
0
        public Team Create(string name, string teamDelegate, string shieldImage, string teamImage)
        {
            {
                var Team = TeamFactory.Create(name, teamDelegate, shieldImage, teamImage);

                TeamRepository.Add(Team);
                TeamRepository.Context.Commit();

                return(Team);
            }
        }
Example #2
0
        public void StartGame()
        {
            _teams = _data.Teams
                     .Select(data =>
            {
                var team = _teamFactory.Create(data);
                team.Initialize();

                return(team);
            })
                     .ToList();
        }
Example #3
0
        public PoolGroup Build()
        {
            PoolFactory poolFactory = new PoolFactory();
            TeamFactory teamFactory = new TeamFactory();
            GameFactory gameFactory = new GameFactory();

            _poolGroup.Pools = poolFactory.Create(_numOfPools);
            _poolGroup.Pools = teamFactory.Create(_poolGroup.Pools, _numOfTeams, _seedMethod);
            _poolGroup.Pools = gameFactory.Create(_poolGroup.Pools, _numOfRounds);

            return(_poolGroup);
        }
Example #4
0
        public void AddTeam(string teamName,
                            Guid teamOwnerId,
                            string description)
        {
            if (Teams.Any(team => team.Name == teamName))
            {
                throw new Exception();
            }

            var team = TeamFactory.Create(teamName, teamOwnerId, Id, description);

            Teams.Add(team);
        }
Example #5
0
        private static void CreateTeamCommand(List <Team> teams, string teamName)
        {
            Team team = TeamFactory.Create(teamName);

            teams.Add(team);
        }