Homework/HW03/canfield.cc
void printGame()
{
    clearScreen();
    cout << "Deck:    ";
    if (waste != -1)
        cout << waste;
    cout << endl << endl
         << "Reserve: ";
    if (!reserve.isEmpty())
        cout << reserve.top();
    cout << endl << endl;
    for (int i=0; i<NUM_SUITS; i++) 
    {
        cout << "F" << i << "      ";
        if (foundation[i].top() > 0)
            cout << setw(2) << foundation[i].top() << "   ";
        else
            cout << "     ";
        cout <<"T" << i << ' ';
        tableau[i].print();
        cout << endl << endl;
    }

    //Display the current score.
    cout << "Score: " << score << "\n\n";

    if (playerHasWon)
        cout << "Congratulations!  You have won the game!\n\n";
}
// Displays the entire content of the game.
Displays the entire content of the game.
Displays the entire content of the game .
void printGame()
{
    clearScreen();
    cout << "Deck:    ";
    if (waste != -1)
        cout << waste;
    cout << endl << endl
         << "Reserve: ";
    if (!reserve.isEmpty())
        cout << reserve.top();
    cout << endl << endl;
    for (int i=0; i<NUM_SUITS; i++) 
    {
        cout << "F" << i << "      ";
        if (foundation[i].top() > 0)
            cout << setw(2) << foundation[i].top() << "   ";
        else
            cout << "     ";
        cout <<"T" << i << ' ';
        tableau[i].print();
        cout << endl << endl;
    }
    cout << "Score: " << score << "\n\n";
    if (playerHasWon)
        cout << "Congratulations!  You have won the game!\n\n";
}
void printGame ( ) { clearScreen ( ) ; cout << " " ; if ( waste != -1 ) cout << waste ; cout << endl << endl << " " ; if ( ! reserve . isEmpty ( ) ) cout << reserve . top ( ) ; cout << endl << endl ; for ( int i = 0 ; i < NUM_SUITS ; i ++ ) { cout << " " << i << " " ; if ( foundation [ i ] . top ( ) > 0 ) cout << setw ( 2 ) << foundation [ i ] . top ( ) << " " ; else cout << " " ; cout << " " << i << ' ' ; tableau [ i ] . print ( ) ; cout << endl << endl ; } cout << " " << score << " \n \n " ; if ( playerHasWon ) cout << " \n \n " ; }
Displays the entire content of the game.
Displays the entire content of the game .
//Display the current score.