/* File: pokerhand.cpp CMSC 202 Computer Science II Spring 2016 Project 2 Implementation of PokerHand class. See pokerhand.h for documentation. */ #include using namespace std ; #include "pokerhand.h" PokerHand::PokerHand () { m_valid = false ; m_rank = NoRank ; m_lastCardPoints = 0 ; m_firstPairPoints = 0 ; m_secondPairPoints = 0 ; m_tripletPoints = 0 ; m_quadrupletPoints = 0 ; } PokerHand::PokerHand (Card c0, Card c1, Card c2, Card c3, Card c4) { // Store cards m_cards[0] = c0 ; m_cards[1] = c1 ; m_cards[2] = c2 ; m_cards[3] = c3 ; m_cards[4] = c4 ; // We have cards. // Note: this assumes c0, ..., c4 are valid // m_valid = true ; m_rank = NoRank ; // Default values for "additional information" // m_lastCardPoints = 0 ; m_firstPairPoints = 0 ; m_secondPairPoints = 0 ; m_tripletPoints = 0 ; m_quadrupletPoints = 0 ; // Don't forget to sort // sort() ; // IF YOU WANT THE ALTERNATE CONSTRUCTOR // TO DO MORE, PLACE THE CODE AFTER THIS // LINE: // -------------------------------------- }