Exemplo n.º 1
0
 private static bool CheckForStraight(CardInt[] cards)
 {
     for (int i = 1; i < cards.Count(); i++)
     {
         if (cards[i].Rank - cards[i - 1].Rank > 1)
         {
             return false;
         }
     }
     return true;
 }
Exemplo n.º 2
0
 private static bool IsSameColour(CardInt[] cards)
 {
     if (cards.Count(x => x.Suit == RequestStructure.Suit.Clubs) >= 5)
     {
         return true;
     }
     if (cards.Count(x => x.Suit == RequestStructure.Suit.Diamonds) >= 5)
     {
         return true;
     }
     if (cards.Count(x => x.Suit == RequestStructure.Suit.Hearts) >= 5)
     {
         return true;
     }
     if (cards.Count(x => x.Suit == RequestStructure.Suit.Spades) >= 5)
     {
         return true;
     }
     return false;
 }