public void dealGame(CardPanel panel) {
        while (!panel.isReady()) {
            try {
                //Wait for graphics to render once before we deal.
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        //Ensures we get to see the deck being dealt
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        startTime = System.currentTimeMillis();
        for (int i = 0; i < 4; i++) {
            kingPiles.add(new CopyOnWriteArrayList<Card>());
        }
        kingPiles.get(0).add(new Card(Card.Suit.HEARTS, Card.Rank.KING, true));
        repaintWhileDealing(panel);
        kingPiles.get(1).add(new Card(Card.Suit.DIAMONDS, Card.Rank.KING, true));
        repaintWhileDealing(panel);
        kingPiles.get(2).add(new Card(Card.Suit.CLUBS, Card.Rank.KING, true));
        repaintWhileDealing(panel);
        kingPiles.get(3).add(new Card(Card.Suit.SPADES, Card.Rank.KING, true));
        repaintWhileDealing(panel);

        for (int i = 0; i < 4; i++) {
            acePiles.add(new CopyOnWriteArrayList<Card>());
        }
        acePiles.get(0).add(new Card(Card.Suit.HEARTS, Card.Rank.ACE, true));
        repaintWhileDealing(panel);
        acePiles.get(1).add(new Card(Card.Suit.DIAMONDS, Card.Rank.ACE, true));
        repaintWhileDealing(panel);
        acePiles.get(2).add(new Card(Card.Suit.CLUBS, Card.Rank.ACE, true));
        repaintWhileDealing(panel);
        acePiles.get(3).add(new Card(Card.Suit.SPADES, Card.Rank.ACE, true));
        repaintWhileDealing(panel);

        pack = new ArrayList<Card>();
        makePacks(pack);
        Collections.shuffle(pack);

        //Make 12 piles
        for (int i = 0; i < 12; i++) {
            board.add(new CopyOnWriteArrayList<Card>());
        }
        deal(panel);

    }