示例#1
0
 public void RemoveCardFromHand(CardPacket card)
 {
     foreach (var cardInHand in Hand)
     {
         if ((cardInHand.CardType == card.CardType) && (cardInHand.CardValue == card.CardValue))
         {
             Hand.Remove(cardInHand);
             break;
         }
     }
 }
示例#2
0
        public bool FindPlayableCardInHand(CardPacket card)
        {
            foreach (var cardInHand in Hand)
            {
                if (cardInHand.CardType == card.CardType)
                {
                    return(true);
                }
                else if (cardInHand.CardValue == card.CardValue)
                {
                    return(true);
                }
            }

            return(false);
        }