public override IEnumerable <Team> MakeTeams() { List <Team> teams = new List <Team>(); for (int i = 1; i <= CustomQueenNumber; i++) { Team ants = new Team(i + ". Ants (" + GetTeamColor(i) + ")"); Queen queen = new Queen(new QueenFactory(LocationMethodUtils.CorrespondingFactory(CustomQueenStartMethod))); queen.AddTurn(1); ants.Entities.Add(queen); teams.Add(ants); } Team food = new Team("Foods"); for (int i = 0; i < CustomFoodNumber; i++) { Miam miam = new Miam(MiamFactory.Instance); miam.AddTurn(1); food.Entities.Add(miam); } teams.Add(food); foreach (var team in teams) { yield return(team); } }