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()); }
public override int GetHashCode() { return(cardName.GetHashCode() * 17 + cardDescription.GetHashCode() * 5 + cardFaction.GetHashCode()); }