public void RemoveCardFromHand(CardPacket card) { foreach (var cardInHand in Hand) { if ((cardInHand.CardType == card.CardType) && (cardInHand.CardValue == card.CardValue)) { Hand.Remove(cardInHand); break; } } }
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); }