/// <summary>
 /// Check if card is 1 less than given card
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean is1LessThan(Card c)
 {
     if (getValue() - c.getValue() == 1)
     {
         return(true);
     }
     return(false);
 }
 /// <summary>
 /// Check if card is 1 More than given card
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean is1MoreThan(Card c)
 {
     if (c.getValue() - getValue() == 1)
     {
         return(true);
     }
     return(false);
 }
Example #3
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>
 /// Check if values match
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean valueMatches(Card c)
 {
     if (getValue() == c.getValue())
     {
         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 #6
0
 /// <summary>
 /// Check if values match
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean valueMatches(Card c)
 {
     if (getValue() == c.getValue()) return true;
     else return false;
 }
Example #7
0
 /// <summary>
 /// Check if card is 1 More than given card
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean is1MoreThan(Card c)
 {
     if (c.getValue()-getValue() == 1)
     {
         return true;
     }
     return false;
 }
Example #8
0
 /// <summary>
 /// Check if card is 1 less than given card
 /// </summary>
 /// <param name="c"></param>
 /// <returns></returns>
 public Boolean is1LessThan(Card c)
 {
     if (getValue()-c.getValue() == 1)
     {
         return true;
     }
     return false;
 }