O'Reilly logo

Joy of Patterns: Using Patterns for Enterprise Development, The by Brandon Goldfedder

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BJ.cpp

 #include <strstream> #include <list> #include "deck.h" #include "card.h" #include "bjhand.h" #include "dealhand.h" #include "simhand.h" #include "dealer.h" #include "display.h" #include "playhand.h" #include "stddisp.h" using namespace std; ostream& operator<<(ostream& s, const Dealer::STATUS& status) { switch (status) { case Dealer::BLACKJACK: s << "BLACKJACK"; break; case Dealer::WIN: s << "WIN"; break; case Dealer::LOSE: s << "LOSE"; break; case Dealer::PUSH: s << "PUSH"; break; default: throw "Illegal status type"; } return s; } void DisplayPlayerResult(const Dealer& dealer, const StandardBlackJackHand& bjh) { char buf[255]; ostrstream output(buf, 255); output << dealer.GetPlayerStatus(&bjh) << '\0'; bjh.GetDisplayer()->DisplayResult(bjh, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required