static public bool DoesCardMatch(Card cardToCheck, Values value) { if (cardToCheck.Value == value) { return true; } else { return false; } }
public static bool DoesCardMatch (Card cardToCheck, Suits suit) { if (cardToCheck.Suit == suit) { return true; } else { return false; } }
private void checkButton_Click(object sender, EventArgs e) { Card cardToCheck = new Card(Suits.Clubs, Values.Three); bool doesItMatch = Card.DoesCardMatch(cardToCheck, Suits.Hearts); textBox.Text = doesItMatch.ToString(); }