public Card Defend(FoolHand fh, Card c, Card tc) //NEEDS TESTING { Card c1 = new Card(); for (int i = 0; i < fh.NumCards; i++) { c1 = cards[i]; if ((c1.HasMatchingSuit(c) && c1.Value > c.Value && c.Value != 1) || (c1.HasMatchingSuit(c) && c1.Value == 1 && c.Value != 1) || (c1.HasMatchingSuit(tc) && c.Suit != tc.Suit) || (c1.HasMatchingSuit(tc) && c.HasMatchingSuit(tc) && (c1.Value > c.Value))) { cards.Remove(c1); return(c1); } } return(null); }
public Card DefendWithCard(Card c, FoolHand fh) { fh.cards.Remove(c); return(c); }
public Card DefendWithSpecificCard(FoolHand fh, int index) //NEEDS TESTING { Card c = fh.cards[index]; return(c); }