import java.util.*;

public class Deck
{
    public Deck (int player)
    {
        _player = player;
        _theDeck = new ArrayDeque<Integer>();
    }

    public final void add (int value)
    {
        _theDeck.add(value);
    }

    public final int draw ()
    {
        return _theDeck.removeFirst();
    }

    public final int size ()
    {
        return _theDeck.size();
    }
    
    public final boolean isEmpty ()
    {
        return (_theDeck.size() == 0);
    }

    public final int score ()
    {
        int index = _theDeck.size();
        int total = 0;
        Iterator<Integer> iter = _theDeck.iterator();

        while (iter.hasNext())
        {
            total += index * iter.next();

            index--;
        }

        return total;
    }

    @Override
    public boolean equals (Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;
    
        if (getClass() == obj.getClass())
        {
            Deck temp = (Deck) obj;

            // ignore player ID for now.

            return (_theDeck.equals(temp._theDeck));
        }

        return false;
    }

    @Override
    public String toString ()
    {
        String str = "Player "+_player+"'s deck: ";
        Iterator<Integer> iter = _theDeck.iterator();

        while (iter.hasNext())
        {
            str += iter.next()+", ";
        }

        return str;
    }

    private int _player;
    private ArrayDeque<Integer> _theDeck;
}
@@ -140,32 +140,270 @@
 eger%3E();%0A    %7D%0A%0A
+    public Deck (Deck deck, int offset)%0A    %7B%0A        _player = deck.player;%0A        _theDeck = new ArrayDeque%3CInteger%3E(deck._theDeck);%0A%0A        for (int i = _theDeck.size() - offset; i %3E 0; i--)%0A            _theDeck.removeLast();%0A    %7D%0A%0A
     public final

Update Deck.java