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