public ExtraDoctor[] CopyExtraDoctorsToArray() { var tempDocArray = new ExtraDoctor[extraDoctors.Count]; extraDoctors.CopyTo(tempDocArray, 0); return(tempDocArray); }
public void OnTickChanges(object state) { var hp = state as Hospital; HospitalManager.CheckConditionAndTreat(hp, this); if (ExtraDoctor != null) // Handles extra doctors if they still exists. { if (patients.Count != 0) { ExtraDoctor.ExhaustedLevel += 5; } if (ExtraDoctor.ExhaustedLevel >= 20) { if (hp.ExtraDoctorsCount() > 0) { ExtraDoctor = hp.DequeueExtraDoctor(); } else { ExtraDoctor = null; } } } }
private IVA(ExtraDoctor extraDoctor, List <Patient> patients, int maxPatients, int risk, int chance) { this.ExtraDoctor = extraDoctor; this.patients = patients; this.MaxPatients = maxPatients; this.risk = risk; this.chance = chance; }
public IVA(Hospital hp, int maxPatients) { this.ExtraDoctor = hp.DequeueExtraDoctor(); this.patients = new List <Patient>(); this.MaxPatients = maxPatients; this.risk = 10; this.chance = 70; OnTickChanges(hp); }
public ExtraDoctor Clone() { var extraDoctor = new ExtraDoctor(this.Name, this.ExhaustedLevel, this.Competence); return(extraDoctor); }