Example #1
0
 /// <summary>
 /// Plays one card from players hand. Returns the card that was played
 /// </summary>
 /// <param name="index"> index of the card</param>
 /// <returns>card at index</returns>
 public Card PlayCard(int index)
 {
     Card temp = new Card(CardValues.NULL, CardSuit.NULL);
     if (cards.Count > index)
     {
         temp = cards[index];
         cards.RemoveAt(index);
     }
     return temp;
 }
Example #2
0
 /// <summary>
 /// Adds card to the tableS
 /// </summary>
 /// <param name="c"></param>
 public void AddCard(Card c)
 {
     if(c.GetValue() != CardValues.NULL)
         CardsOnTable.Add(c);
 }