Question
HELP PLEASE! Need to write a C++ program for the following. Must use functions provided. STL (shuffle, rand, etc) is a must! Please include comments.
HELP PLEASE! Need to write a C++ program for the following. Must use functions provided. STL (shuffle, rand, etc) is a must! Please include comments.
Menu Driven A-Guess only face Value of Card B- Guess Only the suit of the card C- Guess the face and suit
Before the start of the game, create a deck of cards.
Before each guess, use the function random shuffle to randomly shuffle the deck.
On a correct guess, outputYou won!. On an incorrect guess, outputYou lose!.
Must Use the functions provided.
Void guessFaceOnly (vector d);
- The user will guess the face only in a deck of cards. If user enters correct guess display you won, and take back to menu. Else keep going till he chooses correct Face Value.
Void guessSuitOnly (vector d);
- will guess the suit only in a deck of cards. If user enters correct guess display you won, then take back to menu. Else keep going till he chooses the correct suit.
Void guessFaceAndSuit (vector d);
- Will guess the face and suit of a deck of cards. If user enters the correct face and suit, display you won then take Back to menu. Else keep going till the guesses correctly.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started