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); } }
public void StartGame() { _teams = _data.Teams .Select(data => { var team = _teamFactory.Create(data); team.Initialize(); return(team); }) .ToList(); }
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); }
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); }
private static void CreateTeamCommand(List <Team> teams, string teamName) { Team team = TeamFactory.Create(teamName); teams.Add(team); }