コード例 #1
0
 //Constructor
 public Card(char value, CardSuit suit)
     : this()
 {
     if (!Suits.Contains(suit))
     {
         throw new Exception("Invalid Suite");
     }
     else if (value < CharJoker)
     {
         value = CharJoker;
     }
     value = char.ToLower(value);
     Value = value;
     if (Rank > 13 || Rank < 0)
     {
         throw new Exception("Invalid Card Value");
     }
     Suit = suit;
 }