#include "Hand.h" #include "Card.h" /** * Default Constructor * * Starts with an empty List for representing an empty hand. * and an empty array of fingers for the four suits. * */ Hand::Hand() { } /** * Copy Constructor * */ Hand::Hand(const Hand& orig) { } /** * Assignment Operator * */ Hand& Hand::operator=(const Hand& orig) { return *this; } /** * This function should insert a new card into a proper place in the * hand based on the suit of the card: (c.suit) */ void Hand::insertCard(const Card& c) { } /** * If the hand contains any cards of "suit", an arbitrary choice * from that suit should be made, with the card removed from the * hand and returned to the caller. If no cards of the specified * suit are in the hand, then an arbitrary card from some other * suit should be removed from the hand and returned. * * Exceptions: if the hand is completely empty, * throws an EmptyHandException. */ Card Hand::playDown(Card::Suit suit) { return Card(); // REPLACE AS NEEDED } /** * Destructor * */ Hand::~Hand() { } /*================================================ * EXTRA CREDIT follows *================================================*/ /* * are there more cards left in iteration? */ bool Hand::Iterator::hasNext() { return false; } /* * Returns the next available card in the iteration */ Card Hand::Iterator::next() { return Card(); // REPLACE AS NEEDED } /** * This routine should create an Iterator, where the iteration * allows one to iterate through all of the Card's in the hand. */ Hand::Iterator Hand::allCards() { return Iterator(); // REPLACE AS NEEDED } /** * This routine should create an Iterator, where the iteration * allows one to iterate through all of the Card's in the given suit. */ Hand::Iterator Hand::allOfSuit(Card::Suit suit) { return Iterator(); // REPLACE AS NEEDED }