public String toString() { Stack<Card> turn = cardsPile.sampleMultiUnstakables(); StringBuilder sb = new StringBuilder(); int cardsNoTurn = cardsPile.size() - turn.size(); for (int i = 0; i < cardsNoTurn; i++) { sb.append("["); } sb.append(super.toString()); return sb.toString(); }
public boolean puedeApilar(Stack<Card> pilaApilar) { if (pilaApilar == null) return false; return canStack(pilaApilar.sample()); }