Beispiel #1
0
 //draw continually from index 0, which is the top of the deck
 public bool draw()
 {
     //make sure deck actually has a card to draw
     if (deckCards.Count > 0)
     {
         //retrieve card from deck
         Card drawn = deckCards[0];
         //remove from deck
         deckCards.RemoveAt(0);
         //add to lsit of cards in game
         gameCards.Add(drawn);
         Console.WriteLine("Drawn: ");
         drawn.printCard();
         return(true);
     }
     return(false);
 }