Example #1
0
 /// <summary>
 /// Check if Card equals another card.
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean Equals(Card c)
 {
     if (c == null) return false;
     else if ((suit.Equals(c.getSuit())) && (value == c.getValue()))
     {
         return true;
     }
     else return false;
 }
 /// <summary>
 /// Checks if suit matches
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean suitMatches(Card c)
 {
     if (suit.Equals(c.getSuit()))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
 /// <summary>
 /// Check if Card equals another card.
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean Equals(Card c)
 {
     if (c == null)
     {
         return(false);
     }
     else if ((suit.Equals(c.getSuit())) && (value == c.getValue()))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #4
0
 /// <summary>
 /// Checks if suit matches
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean suitMatches(Card c)
 {
     if (suit.Equals(c.getSuit()))
     {
         return true;
     }
     else return false;
 }