// Copyright Sven-Olof Nystrom Uppsala University 2025

public class OtherPile extends Pile {

    // Only accepts cards that are not of the same suit as the top
    // card.

    static final int OFFSET = 20;

    public OtherPile (int x, int y) {
        super(x,y);
    }

    public boolean canAccept(Card c) {
        return isEmpty() || top().getSuit() != c.getSuit();
    }

    public void add(Card c) {
        int depth = size();
        super.add(c);
	c.move(getX()+depth*OFFSET,getY());
    }

    public boolean canRelease() {
        return true;
    }


}
