private float GetTotalOxygenProduced()
        {
            float output = 0;

            if (LeftLung.IsPresent)
            {
                output += LeftLung.GetLungOxygenProduction();
            }
            if (RightLung.IsPresent)
            {
                output += RightLung.GetLungOxygenProduction();
            }
            output *= RespiratoryRate;
            return(output);
        }
        public float GetLungFunction()
        {
            float average = 0;

            if (LeftLung.IsPresent)
            {
                average += LeftLung.GetLungEfficiency();
            }
            if (RightLung.IsPresent)
            {
                average += RightLung.GetLungEfficiency();
            }

            return(average / 2);
        }
        public bool RemoveLung(bool isTargetLeft, out Lung RemovedLung)
        {
            if (isTargetLeft && LeftLung.IsPresent)
            {
                RemovedLung = LeftLung;
                LeftLung.RemoveOrgan();
                return(true);
            }

            if (!isTargetLeft && RightLung.IsPresent)
            {
                RemovedLung = RightLung;
                RightLung.RemoveOrgan();
                return(true);
            }

            RemovedLung = null;
            return(false);
        }
 public RespiratorySystem(LeftLung leftLung = null, RightLung rightLung = null, int?respiratoryRate = null)
 {
     RespiratoryRate = respiratoryRate ?? DefaultOrgans.DefaultRespiratorySystem.RespirationRatePerMinute;
     LeftLung        = leftLung ?? new LeftLung();
     RightLung       = rightLung ?? new RightLung();
 }