Ejemplo n.º 1
0
 /// <summary>
 /// Here is the description a Card.
 /// </summary>
 /// <param name="cardName"></param>
 /// <param name="point"></param>
 /// <param name="suit"></param>
 /// <param name="characterType"></param>
 public Card(string cardName, DataType.Point point, DataType.Suit suit, DataType.CharacterType characterType)
 {
     makedSprite = false;
     this.cardName = cardName;
     this.point = point;
     this.suit = suit;
     this.characterType = characterType;
 }
Ejemplo n.º 2
0
    void CreateDeck()
    {
        //Create usual cards.
        for (int suit = 0; suit < 4; suit++)
        {
            for (int value = 0; value < 13; value++)
            {
                DataType.Point p    = (DataType.Point)value;
                DataType.Suit  s    = (DataType.Suit)suit;
                string         name = s.ToString() + p.ToString();
                Card           card = new Card(name, p, s, cType);
                library.Add(card);
            }
        }

        //Creat&Add joker.
        Card smallJoker = new Card("SJoker", DataType.Point.SJoker, DataType.Suit.None, cType);
        Card largeJoker = new Card("LJoker", DataType.Point.LJoker, DataType.Suit.None, cType);

        library.Add(smallJoker);
        library.Add(largeJoker);
    }