public void OneTimeSetUp() { personCitizen = PersonFactory.GenerateCitizen(); personMedicalStaff = PersonFactory.GenerateMedicalStaff(); personMilitary = PersonFactory.GenerateMilitary(); personFirstResponder = PersonFactory.GenerateFirstResponder(); }
public void ProtectionTest() { Assert.AreEqual(person.Prevention, 0); Assert.GreaterOrEqual(PersonFactory.GenerateMedicalStaff().Protection, 97.70); Assert.GreaterOrEqual(PersonFactory.GenerateMilitary().Protection, 88.79); Assert.GreaterOrEqual(PersonFactory.GenerateFirstResponder().Protection, 97.70); }
/// <summary> /// Primary simulator class constructor //TODO: Add more complex settings /// </summary> /// <param name="citizenCount">Ordinary citizen count</param> /// <param name="medicalStaffCount">Medical staff count</param> /// <param name="firstResponderCount">First responder count</param> /// <param name="militaryCount">Military personnel count</param> /// <param name="infectedCitizenCount">Infected citizen count</param> public Simulator(uint citizenCount, uint medicalStaffCount, uint firstResponderCount, uint militaryCount, uint infectedCitizenCount) { //Generate people for (uint i = 0; i < citizenCount; i++) { Citizens.Add(PersonFactory.GenerateCitizen()); } //Generate people for (uint i = 0; i < infectedCitizenCount; i++) { Citizens.Add(PersonFactory.GenerateCitizen(Person.HealthStatusEnum.Symptoms)); } //Generate medicalStaff for (uint i = 0; i < medicalStaffCount; i++) { Citizens.Add(PersonFactory.GenerateMedicalStaff()); } //Generate military for (uint i = 0; i < militaryCount; i++) { Citizens.Add(PersonFactory.GenerateMilitary()); } //Generate firstResponder for (uint i = 0; i < firstResponderCount; i++) { Citizens.Add(PersonFactory.GenerateMilitary()); } Console.WriteLine($"Starting state {_day++}"); Console.WriteLine( $"Healthy count: {Citizens.Count(person => person.Health == Person.HealthStatusEnum.Healthy)}"); Console.WriteLine( $"Asymptomatic count: {Citizens.Count(person => person.Health == Person.HealthStatusEnum.Asymptomatic)}"); Console.WriteLine( $"Symptoms count: {Citizens.Count(person => person.Health == Person.HealthStatusEnum.Symptoms)}"); Console.WriteLine( $"Seriously ill count: {Citizens.Count(person => person.Health == Person.HealthStatusEnum.SeriouslyIll)}"); Console.WriteLine( $"Immune count: {Citizens.Count(person => person.Health == Person.HealthStatusEnum.Immune)}"); Console.WriteLine( $"Dead count: {Citizens.Count(person => person.Health == Person.HealthStatusEnum.Deceased)}"); Console.WriteLine( "###############"); }