/// <summary> /// Match this card against other cards /// </summary> /// <param name="otherCard">Another card to match</param> /// <returns>Match score</returns> public virtual int Match(Card otherCard) { int score = 0; if (Contents != null && otherCard != null && otherCard.Contents != null && Contents.Equals(otherCard.Contents)) { score = 1; } return(score); }
public override bool Equals(Reg other) { var acr = other as AddrAndContentsReg; if (acr == null) { return(false); } if (Addr.Equals(acr.Addr) == false) { return(false); } return(Contents.Equals(acr.Contents)); }
/// <summary> /// Checks for equality against another token. /// </summary> /// <param name="other">The other token.</param> /// <returns>True if the tokens are equal; false otherwise. /// </returns> public bool Equals(Token other) { return(Contents.Equals(other.Contents) && (StartsWithQuote == other.StartsWithQuote) && (EndsWithQuote == other.EndsWithQuote)); }