Homework/HW03/canfield.cc
void addCard(int card)
{
    if (from == 'T' && (to == 't' || to == 'T')) 
    {
        // add the stack onto which we move at the end of the one we move.
        tableau[fromId].concatenate(tableau[toId]);
        // move that stack back into the destination stack.
        tableau[toId].concatenate(tableau[fromId]);
    }
    else 
        if (to == 't' || to == 'T') 
            tableau[toId].push(card);
        else
            foundation[toId].push(card);
}
// Adds the card or the entire tableau to its new destination.
Adds the card or the entire tableau to its new destination.
Adds the card or the entire tableau to its new destination .
void addCard(int card)
{
    if (from == 'T' && (to == 't' || to == 'T')) 
    {
        tableau[fromId].concatenate(tableau[toId]);
        tableau[toId].concatenate(tableau[fromId]);
    }
    else 
        if (to == 't' || to == 'T') 
            tableau[toId].push(card);
        else
            foundation[toId].push(card);
}
void addCard ( int card ) { if ( from == ' ' && ( to == ' ' || to == ' ' ) ) { tableau [ fromId ] . concatenate ( tableau [ toId ] ) ; tableau [ toId ] . concatenate ( tableau [ fromId ] ) ; } else if ( to == ' ' || to == ' ' ) tableau [ toId ] . push ( card ) ; else foundation [ toId ] . push ( card ) ; }
Adds the card or the entire tableau to its new destination.
Adds the card or the entire tableau to its new destination .
// add the stack onto which we move at the end of the one we move. // move that stack back into the destination stack.