public Card PlayNextCard() { // if the player has run out of cards in their current deck, replace their pile with the pile of won cards if (currentPile.GetSize() == 0) { ReplaceCurrentPile(); } // if the player has not run out of cards, return the next card in the current pile if (currentPile.GetSize() > 0) { return(currentPile.GetNextCard()); } return(null); }
public void AddMultipleCards(Pile p) { // while there are still cards in the passed in pile, add them to main pile while (p.GetSize() > 0) { AddCard(p.GetNextCard()); } }
public int GetTotalNumberOfCards() { // return the total size of the play pile and the won pile return(currentPile.GetSize() + wonPile.GetSize()); }