Пример #1
0
        private ISuit GetCardSuit(Card c)
        {
            if (c.Rank.AsEnum() == RankEnum.Jack && c.Suit.AsEnum() == _trumpSuit.NextSuit())
            {
                return(_trumpSuit);
            }

            return(c.Suit);
        }
Пример #2
0
        /// <inheritdoc cref="IEquatable{T}"/>
        public bool Equals(ISuit other)
        {
            if (other == null)
            {
                return(false);
            }

            return(other.AsCharacter() == AsCharacter() &&
                   other.AsEnum() == AsEnum() &&
                   other.NextSuit() == NextSuit());
        }