public override int GetHashCode() { unchecked { int result = Direction.GetHashCode(); result = (result * 397) ^ Movement.GetHashCode(); result = (result * 397) ^ Up.GetHashCode(); result = (result * 397) ^ Down.GetHashCode(); result = (result * 397) ^ Left.GetHashCode(); result = (result * 397) ^ Right.GetHashCode(); return(result); } }