Ejemplo 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);
     }
 }
Ejemplo 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);
 }