Exemple #1
0
        public bool Equals(Faction other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (this.GetHashCode() != other.GetHashCode())
            {
                return(false);
            }

            System.Diagnostics.Debug.Assert(
                base.GetType() != typeof(object));

            if (!base.Equals(other))
            {
                return(false);
            }

            return(this.GetType() == other.GetType());
        }
Exemple #2
0
 public override int GetHashCode()
 {
     return(cardName.GetHashCode() * 17 + cardDescription.GetHashCode() * 5 + cardFaction.GetHashCode());
 }