Ejemplo n.º 1
0
 public void BornCitizen()
 {
     Citizen citizen = new Citizen(this, iss);
     Citizens.Add(citizen);
     LivingCitizens.Add(citizen);
 }
Ejemplo n.º 2
0
 public void KillCitizen(Citizen citizen)
 {
     LivingCitizens.Remove(citizen);
 }
Ejemplo n.º 3
0
        public void add(Citizen Citizen)
        {
            totalCitizens++;

            if (Citizen.State != CitizenState.Dead)
                livingCitizens++;

            int val;
            if (totalCitizenStates.TryGetValue(Citizen.State, out val))
                totalCitizenStates[Citizen.State] = val + 1;
            else
                totalCitizenStates.Add(Citizen.State, 1);

            totalPaid += Citizen.PaidSum;
            totalGet += Citizen.getSum;

            if (Citizen.State != CitizenState.Dead)
            {
                currentPay += Citizen.Tax;
                currentGet += Citizen.Rent;
                ageSum += Citizen.Age.Years;
            }
            else
            {
                ageOfDeathSum += Citizen.Age.Years;
            }
        }