示例#1
0
 public void shuffle() {
   Cards<Card> shuffled = new Cards<Card>();
   List<Card> cards = deck.getCards();
   while (cards.size() > 0) {
     shuffled.add((Card) cards.remove(rng.nextInt(cards.size())));
   }
   deck = shuffled;
 }