import java.util.Random;

public class Deck extends CardHolder
{
  private Random r = new Random();

  public Deck()
  {
    super(true);
  }

  public Card getCardFromDeck()
  {
    return super.getCardFromHolder();
  }

  public void putCardIntoDeck(Card c)
  {
    super.putCardIntoHolder(c);
  }

  public void shuffle()
  {
    for(int i =0; i < 100; i++)
    {
      int where = r.nextInt(52);
      Card temp = this.theCards[where];
      this.theCards[where] = this.theCards[0];
      this.theCards[0] = temp;
    }
  }
    

  public static void main(String args[])
  {
    Deck d = new Deck();
    System.out.println(d);
    System.out.println("After shuffle");
    d.shuffle();
    System.out.println(d);
  }
}
