private Judgment GetFactor5()
        {
            Judgment judgment;

            judgment = new Judgment(FactorName.ConnectedDevices, EvaluationValue.NotEmpty);

            return(judgment);
        }
        private Judgment GetFactor6()
        {
            Judgment judgment;

            judgment = new Judgment(FactorName.FlapPosition, EvaluationValue.Open);

            return(judgment);
        }
        private Judgment GetFactor4()
        {
            Judgment judgment;

            judgment = new Judgment(FactorName.FuelInCan, EvaluationValue.Empty);

            return(judgment);
        }
        private Judgment GetFactor1()
        {
            Judgment judgment;

            judgment = new Judgment(FactorName.OilInTank, EvaluationValue.Empty);

            return(judgment);
        }
        private Judgment GetFactor7()
        {
            Judgment judgment;

            judgment = new Judgment(FactorName.AmbientTemperature, EvaluationValue.Hight);

            return(judgment);
        }
        public void Print()
        {
            Console.WriteLine("————————————————————————————————————————");
            Console.WriteLine("Правило");
            Console.WriteLine("————————————————————————————————————————");
            Console.WriteLine("Aнтецедент(-ы):");

            IEnumerator <Judgment> antecedentJudgments = this.antecedent.JudgmentList.GetEnumerator();

            while (antecedentJudgments.MoveNext())
            {
                Judgment antecedentJudgment = antecedentJudgments.Current;
                antecedentJudgment.Print();
            }

            Console.WriteLine("Консеквент:");
            this.consequent.Judgment.Print();
            Console.WriteLine("————————————————————————————————————————\n\n");
        }
        public override bool Equals(object obj)
        {
            if (obj is Judgment)
            {
                Judgment judgment = obj as Judgment;

                if (this.name == judgment.name &&
                    this.value == judgment.value)
                {
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            else
            {
                throw new ArgumentException();
            }
        }
 public Antecedent(Judgment judgment)
 {
     this.judgmentList = new List <Judgment> {
         judgment
     };
 }
 public Consequent(Judgment judgment)
 {
     this.judgment = judgment;
 }