How would I write a method that rearranges cards in a deck
<p>I need to split a deck of cards into two packets: the top half and the bottom half.  This new array of cards is suppose to go: first card from from the top packet, first card from bottom packet, second card from top packet, second card from bottom packet, etc.  If there are an odd number of cards then the top packet should have one more than the bottom packet.  The top of the deck is the front of the array.</p>

<p>How would I go about doing this?</p>

<p>Here is the method I created to generate the deck of cards (I think it works):</p>

<pre><code>private Card[] cards;
int value, suit;
private final int DECK_SIZE = 52;

public Deck()
    {
        int index = 0;
        cards = new Card[DECK_SIZE];
        //0 = spades, 1 = hearts, 2 = clovers, 3 =diamonds
        int suits[] = {0, 1, 2, 3};
        //1 = Ace, 11=jack, 12=queen, 13=king
        int values[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};
        for (int suit : suits)
            for (int value : values)
            {
                cards[index] = new Card(value, suit);
                index++;
            }
    }
</code></pre>
