Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (header_ != null)
            {
                hash ^= Header.GetHashCode();
            }
            if (position_ != null)
            {
                hash ^= Position.GetHashCode();
            }
            if (velocity_ != null)
            {
                hash ^= Velocity.GetHashCode();
            }
            if (attitude_ != null)
            {
                hash ^= Attitude.GetHashCode();
            }
            hash ^= pvaCovar_.GetHashCode();
            if (InitAndAlignment != false)
            {
                hash ^= InitAndAlignment.GetHashCode();
            }
            return(hash);
        }
        /// <summary>
        ///     Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked             // Overflow is fine, just wrap
            {
                int hashCode = 41;
                // Suitable nullity checks etc, of course :)

                hashCode = hashCode * 59 + EnergyCubes.GetHashCode();

                hashCode = hashCode * 59 + Health.GetHashCode();

                hashCode = hashCode * 59 + Active.GetHashCode();

                hashCode = hashCode * 59 + Virtual.GetHashCode();

                hashCode = hashCode * 59 + Priority.GetHashCode();

                hashCode = hashCode * 59 + OnTurn.GetHashCode();

                hashCode = hashCode * 59 + IsMine.GetHashCode();

                hashCode = hashCode * 59 + HandCards.GetHashCode();

                hashCode = hashCode * 59 + Attitude.GetHashCode();

                hashCode = hashCode * 59 + Type.GetHashCode();
                return(hashCode);
            }
        }