Track actual cards in the player\'s and dealer\'s hands. I\'dleave this until th
ID: 3618485 • Letter: T
Question
Track actual cards in the player's and dealer's hands. I'dleave this until the rest of it works. If you've broken upsome functions already, the current score tracking should continueto work fine. As with the first part, it's important to havea working finished project (although feel free to upload both yourlast working version and your most recent version). You need to setup arrays for the player's and dealer's cards. An array of 11cards will be enough, so long as you don't allow the player to keephitting with 21. YOu can also design the game using 5-, 6-,or 7-card charlie, in which case having 5, 6, or 7 cards withoutbusting is a win for the player. Since this option favors theplayer, it's not particularly realistic, and it's not actuallyeasier to code than leaving it out, but it's fine if you want toinclude it. Doing so, of course, limits the player hand to 5,6, or 7 cards. The dealer would draw as normal. (The dealerholds at 16 and above, and so could not actually get 11cards. Feel free to work out what lower value is the dealer'smax, if you like, but it's not particularly important.
If your do implement this, your scores may be calculated eachdraw based on the actual cards in the hand. You can also calculatethe score in parallel to tracking the cards. You'll want afunction to calculate a hand's score if it's done on thecards. In either case, after each draw the player's (ordealer's) hand should be listed in full.
Explanation / Answer
x.Hlor="red">please rate - thanks #include #include #include using namespace std; void deal(int,int&,int& ,int[][2],int&,int[][2] ); void deal(int,int&,int&,int&,int[][2],int&,int[][2] ); int getbet(int); void filldeck(int[][2],int); void shuffle(int[][2],int); void printhand(int,int[][2]); int main() {string suit[4]={"hearts","diamonds","spades","clubs"}; string card[13]={"ace","2","3","4","5","6","7","8","9","10","jack","queen","king"}; int totdealer,totplayer,upto=0; int money,bet,aces,decks=2,j; int deck[52*decks][2]; int dealhand[20][2],playhand[20][2],playcards,dealcards; char yesno='Y'; bool again; srand(time(0)); filldeck(deck,decks); /* coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.