Exemplo 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());
 }
Exemplo n.º 2
0
 public static bool DoesCardMatch(Card cardtoCheck, Suit suit)
 {
     if (cardtoCheck.Suit == suit)
     {
         return true;
     }
     else
     {
         return false;
     }
 }
Exemplo n.º 3
0
 public static bool DoesCardMatch(Card cardToCheck, Value value)
 {
     if (cardToCheck.Value == value) return true;
     else return false;
 }