Ejemplo n.º 1
0
        public ExtraDoctor[] CopyExtraDoctorsToArray()
        {
            var tempDocArray = new ExtraDoctor[extraDoctors.Count];

            extraDoctors.CopyTo(tempDocArray, 0);
            return(tempDocArray);
        }
Ejemplo n.º 2
0
        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;
                    }
                }
            }
        }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 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);
        }