Esempio n. 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = IsSpecial.GetHashCode();
         hashCode = (hashCode * 397) ^ CapturesThisWay.GetHashCode();
         hashCode = (hashCode * 397) ^ DeltaX;
         hashCode = (hashCode * 397) ^ DeltaY;
         hashCode = (hashCode * 397) ^ Count;
         return(hashCode);
     }
 }
Esempio n. 2
0
 public bool Equals(MoveDirection other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(IsSpecial.Equals(other.IsSpecial) &&
            CapturesThisWay.Equals(other.CapturesThisWay) &&
            DeltaX == other.DeltaX &&
            DeltaY == other.DeltaY && Count == other.Count);
 }