< previous page page_1104 next page >

Page 1104
MoveFour()
FOR count going from 1 through 4
  onTable.RemoveTop(tempCard)
  discardPile.InsertTop(tempCard)

MoveTwo ()
Save top card from onTable
Move top card from onTable to discardPile
Move top card from onTable to discardPile
Restore original top card to onTable

The implementations of the Player class member functions are shown in the player.cpp file below.
//******************************************************************
// IMPLEMENTATION FILE (player.cpp)
// This file implements the Player class member functions
//******************************************************************
#include player.h

// Private members of class
//    CardDeck deck;              Deck of cards
//    CardPile onTable;           Cards face up on the table
//    CardPile discardPile;       Cards on discard pile
//
//    void TryRemove( CardPile&, CardPile& );
//    void MoveFour( CardPile&, CardPile& );
//    void MoveTwo( CardPile&, CardPile& );

//******************************************************************

void Player::PlayGame( /* in */  int      numberOfShuffles,
                       /* out */ Boolean& won         )

// Places each card in the deck face up on the table
// and applies rules for moving

 
< previous page page_1104 next page >