Пример #1
0
        public bool DoesOverlap(Meld other)
        {
            var theseCards = this.GetListOfCardsInMeld().Select(i => i.ToString());
            var otherCards = other.GetListOfCardsInMeld().Select(i => i.ToString());

            return(theseCards.Intersect(otherCards).Count() > 0);
        }
Пример #2
0
 public bool IsEqual(Meld other)
 {
     return(_cards.Except(other._cards, new CardEqualityComparerSuitAndRank()).Count() == 0 && other._cards.Except(_cards, new CardEqualityComparerSuitAndRank()).Count() == 0);
 }