Ejemplo n.º 1
0
        public override int CompareSameFact(IFact <ChessGame> that)
        {
            SimpleFact fact = that as SimpleFact;

            if (PropertyName == fact.PropertyName)
            {
                return(this.Value.CompareTo(fact.Value));
            }
            return(PropertyName.CompareTo(fact.PropertyName));
        }
Ejemplo n.º 2
0
        public override bool Implies(IFact <ChessGame> that)
        {
            if (that == null)
            {
                return(false);
            }

            SimpleFact fact = that as SimpleFact;

            return(Implies(fact));
        }
Ejemplo n.º 3
0
        public bool Implies(SimpleFact that)
        {
            if (that == null)
            {
                return(false);
            }

            var index = this.Value.IndexOf(",");
            var value = index > -1 ? this.Value.Remove(index) : this.Value;

            return(value.Equals(that.Value));
        }
Ejemplo n.º 4
0
        public override bool Equals(Object obj)
        {
            if (obj == null)
            {
                return(false);
            }

            SimpleFact fact = obj as SimpleFact;

            if (fact == null)
            {
                return(false);
            }

            return(Equals(fact));
        }
Ejemplo n.º 5
0
        public bool Equals(SimpleFact that)
        {
            if (that == null)
            {
                return(false);
            }

            if (this.PropertyName.Equals(that.PropertyName))
            {
                return(this.Value.Equals(that.Value));
            }
            else
            {
                return(false);
            }
        }