Esempio n. 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     Card cardtoCheck = new Card(Suit.Clubs, Value.Three);
     bool doesItMatch = Card.DoesCardMatch(cardtoCheck, Suit.Heart);
     bool doesItMatchAgain = Card.DoesCardMatch(cardtoCheck, Value.Three);
     MessageBox.Show("Match on Suit:" + doesItMatch.ToString() + "\rMatch on value:" + doesItMatchAgain.ToString());
 }
Esempio n. 2
0
 public static bool DoesCardMatch(Card cardtoCheck, Suit suit)
 {
     if (cardtoCheck.Suit == suit)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Esempio n. 3
0
 public static bool DoesCardMatch(Card cardToCheck, Value value)
 {
     if (cardToCheck.Value == value) return true;
     else return false;
 }