Exemple #1
0
 public Card drawTop() {
   if (deck.size() == 0) {
     deck = discardPile;
     discardPile = new Cards<Card>();
     shuffle();
   }
   return deck.removeFirst();
 }
Exemple #2
0
 public int size() {
   return deck.size() + discardPile.size();
 }