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)); }
public override bool Implies(IFact <ChessGame> that) { if (that == null) { return(false); } SimpleFact fact = that as SimpleFact; return(Implies(fact)); }
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)); }
public override bool Equals(Object obj) { if (obj == null) { return(false); } SimpleFact fact = obj as SimpleFact; if (fact == null) { return(false); } return(Equals(fact)); }
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); } }