I'm not sure why there's runtime
import java.awt.*;
import java.util.Stack;
import java.util.EmptyStackException;
public class CardPile {
// coordinates of the card pile
private int x;
private int y;
private Stack thePile;
public CardPile(int xl, int yl) {
x = xl;
y = yl;
thePile = new Stack();
}
// pop card at the top of pile
public final Card pop() {
try {
return (Card) thePile.pop();
}
catch (EmptyStackException e) {
return null;