Пример #1
0
        public void UpdateActiveTeams()
        {
            int c = 0;

            foreach (var team in teams)
            {
                if (team != null)
                {
                    c++;
                }
            }
            activeTeams = new IndexedTeam[c];
            c           = 0;
            for (int i = 0; i < MAX_PLAYERS; i++)
            {
                if (teams[i] != null)
                {
                    activeTeams[c++] = new IndexedTeam(i, teams[i]);
                }
            }
        }
Пример #2
0
 public void UpdateActiveTeams()
 {
     int c = 0;
     foreach(var team in teams) {
         if(team != null) c++;
     }
     activeTeams = new IndexedTeam[c];
     c = 0;
     for(int i = 0; i < MAX_PLAYERS; i++) {
         if(teams[i] != null) activeTeams[c++] = new IndexedTeam(i, teams[i]);
     }
 }