Files Classes Functions Hierarchy
00001 #include <dealer.h> 00002 00003 #include <cassert> 00004 00005 void dealer::play() 00006 { 00007 for ( ; hnd.value<17; ) 00008 hnd.add(cards.draw()); 00009 } 00010 00011 int const dealer::playAgainst( uintc player, uintc dealer0 ) 00012 { 00013 hnd.reset(dealer0); 00014 play(); 00015 00016 uint val = hnd.calculate(); 00017 if (player<val) 00018 return -1; 00019 00020 if (val<player) 00021 return 1; 00022 00023 return 0; 00024 } 00025 00026 void dealer::playAgainst 00027 ( 00028 double & prPlayerLoss, 00029 double & prDraw, 00030 double & prPlayerWin, 00031 long unsigned int n, 00032 uintc player, 00033 uintc dealer0 00034 ) 00035 { 00036 assert(false); 00037 00038 } 00039 00040 00041 00042
1.5.8