Exemplo n.º 1
0
 public Card(CardNomination cardNomination, Suit suit)
 {
     CardNomination = cardNomination;
     Suit           = suit;
 }
        private static Tuple<CardNomination, Card[]> GetNominationWithLength(int length, Card[] cards, CardNomination exclude = null)
        {
            var group = (exclude == null
                                ? cards
                                : cards.Where(c => c.CardNomination != exclude))
                .GroupBy(c => c.CardNomination).FirstOrDefault(g => g.Count() == length);

            var card = group == null? null : group.FirstOrDefault();
            return card == null
                ? null
                : new Tuple<CardNomination, Card[]>(card.CardNomination, cards.Where(c => c.CardNomination != card.CardNomination).ToArray());
        }
Exemplo n.º 3
0
 public Card(CardNomination cardNomination, Suit suit)
 {
     CardNomination = cardNomination;
     Suit = suit;
 }