import java.awt.*;
public class CardPile extends CardSet
{
public CardPile(int x, int y)
{
super(x, y);
}
public int getWidth(CardPictureStore store)
{
return store.GetCardSize().width;
}
public int getHeight(CardPictureStore store)
{
return store.GetCardSize().height;
}
public boolean CanAddCard(Card c)
{
return true;
}
public void Draw(CardPictureStore store, Graphics g, Component c)
{
int nSize = GetNumCards();
if (nSize == 0)
g.drawImage(store.GetEmptyCard(), x, y, c);
else
GetTopCard().Draw(store, g, c, x, y);
}
}