Esempio n. 1
0
 /// <summary>
 /// Constructor which creates the list of cards within the loop and adds them 
 /// to the list of cards.
 /// </summary>
 public Deck()
 {
     for (int i = 1; i < 14; i++)
     {
         Card heartCard = new Card(i, CardSuit.Heart, String.Format("h{0}.png", i));
         Card spadeCard = new Card(i, CardSuit.Spade, String.Format("s{0}.png", i));
         Card diamondCard = new Card(i, CardSuit.Diamond, String.Format("d{0}.png", i));
         Card clubCard = new Card(i, CardSuit.Club, String.Format("c{0}.png", i));
         cards.Add(heartCard);
         cards.Add(spadeCard);
         cards.Add(diamondCard);
         cards.Add(clubCard);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Creates instance of DrawCardEventArgscs and send the card with it, also sets it.
 /// </summary>
 public void GetAceSuit(Card card)
 {
     DrawCardEventArgscs drawCEA = new DrawCardEventArgscs(card);
     OnAceDrawn(drawCEA);
 }
Esempio n. 3
0
 /// <summary>
 /// Method that has object card as parameter, 
 /// also sends card to the method GetAceSuit
 /// </summary>
 public Deck(Card card)
 {
     this.card = card;
     GetAceSuit(card);
 }
Esempio n. 4
0
 public DrawCardEventArgscs(Card card)
 {
     a_card = card;
 }