/// <summary> /// Get a Bitmap class of the picture of the card. If the card is null, returnes the back of the card. /// </summary> /// <param name="val">Number/Value of the card</param> /// <param name="suit">Suit of the card</param> /// <returns>Bitmap of the picture of the card.</returns> public static Bitmap GetCardPicture(CardVal val, CardSuit suit) { if (Resources.cardPics == null) { Resources.InitializeDictionary(); } return(Resources.cardPics[new KeyPair <CardVal, CardSuit>(val, suit)]); }
/// <summary> /// Initializes a new instance of the CardLib.Card class with a number and suit from another card /// </summary> /// <param name="card">The card from which to copy the number and suit</param> public Card(Card card) { Suit = card.Suit; Val = card.Val; }
/// <summary> /// Initializes a new instance of the CardLib.Card class with a given card suit and card number /// </summary> /// <param name="suit">The suit of the new card</param> /// <param name="val">The number of the new card</param> public Card(char suit, int val) { Suit = (CardSuit)suit; Val = (CardVal)val; }
/// <summary> /// Initializes a new instance of the CardLib.Card class with a given card suit and card number /// </summary> /// <param name="suit">The suit of the new card</param> /// <param name="val">The number of the new card</param> public Card(char suit, CardVal val) { Suit = (CardSuit)suit; Val = val; }
/// <summary> /// Initializes a new instance of the CardLib.Card class with a given card suit and card number /// </summary> /// <param name="suit">The suit of the new card</param> /// <param name="val">The number of the new card</param> public Card(CardSuit suit, int val) { Suit = suit; Val = (CardVal)val; }
/// <summary> /// Initializes a new instance of the CardLib.Card class with a given card suit and card number /// </summary> /// <param name="suit">The suit of the new card</param> /// <param name="val">The number of the new card</param> public Card(CardSuit suit, CardVal val) { Suit = suit; Val = val; }