Example #1
0
  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();
  }
Example #2
0
 public boolean puedeApilar(Stack<Card> pilaApilar) {
   if (pilaApilar == null) return false;
   return canStack(pilaApilar.sample());
 }