Exemple #1
0
    public void Return(Human human)
    {
        switch (human.Profession)
        {
        case Human.ProfessionType.Agent:
        {
            FreeAgents.Add(human);
            break;
        }

        case Human.ProfessionType.Operative:
        {
            FreeOperatives.Add(human);
            break;
        }

        case Human.ProfessionType.Scientist:
        {
            FreeScientists.Add(human);
            break;
        }

        case Human.ProfessionType.D_Personnel:
        {
            FreeD_Personnel.Add(human);
            break;
        }
        }
    }
Exemple #2
0
    public void Hire(Human newHuman)
    {
        newHuman.ID = GetNewHumanID();
        People.Add(newHuman.ID, newHuman);
        switch (newHuman.Profession)
        {
        case Human.ProfessionType.Agent:
        {
            FreeAgents.Add(newHuman);
            AgentsCount++;
            break;
        }

        case Human.ProfessionType.Operative:
        {
            FreeOperatives.Add(newHuman);
            OperativesCount++;
            break;
        }

        case Human.ProfessionType.Scientist:
        {
            FreeScientists.Add(newHuman);
            ScientistsCount++;
            break;
        }

        case Human.ProfessionType.D_Personnel:
        {
            FreeD_Personnel.Add(newHuman);
            D_PersonnelCount++;
            break;
        }
        }
    }
Exemple #3
0
    public void Kill(Human human)
    {
        switch (human.Profession)
        {
        case Human.ProfessionType.Agent:
        {
            if (FreeAgents.Contains(human))
            {
                FreeAgents.Remove(human);
            }
            AgentsCount--;
            break;
        }

        case Human.ProfessionType.Operative:
        {
            if (FreeOperatives.Contains(human))
            {
                FreeOperatives.Remove(human);
            }
            OperativesCount--;
            break;
        }

        case Human.ProfessionType.Scientist:
        {
            if (FreeScientists.Contains(human))
            {
                FreeScientists.Remove(human);
            }
            ScientistsCount--;
            break;
        }

        case Human.ProfessionType.D_Personnel:
        {
            if (FreeD_Personnel.Contains(human))
            {
                FreeD_Personnel.Remove(human);
            }
            D_PersonnelCount--;
            break;
        }
        }
        People.Remove(human.ID);
    }