Help creating a blackjack game using c++ To play this game, we need .docx

This preview shows page 1 - 4 out of 12 pages.

Help creating a blackjack game using c++ To play this game, we need to create a class to represent a playing card, in the card, we need to store three items, the value, the suit, and the rank. Next, create a deck class with an array of fifty-two cards. Then, using rand(), shuffle the deck. Finally, deal the cards for one player and one dealer. Allow the player to hit or stand; then the dealer will play. At the end of the hand, the winner will be determined and congratulated. The dealer and player classes will need a Vector inside to store their cards during the game. After the above is working, you will add to the game the ability to make bets. The player will start out will some initial amount, one hundred dollars is a good start, and place bets on each hand of cards. The game will continue until the player quits or is out of money. Remember to reshuffle the deck when it is empty. Solution #include <iostream> #include <vector> #include <algorithm> #include <ctime> #include <string> class Card { private: char
m_card; // \'A\' ,\'2\', \'3\', \'4\', \'5\', \'6\', \'7\', \'8\', \'9\', \'T\' , \'J\', \'Q\' int m_value, //1 or 11 , 2 , 3 , 4, 5 , 6 , 7 , 8 , 9, 10, 10, 10 m_suite; //0 spades, 1 clubs, 2 hearts, 3 diamonds std::string m_nameS; bool m_given; //Check if it\'s been wether given or not. works as an index int assignValue(); public: Card(char, int); Card(const Card&); int getValue() const; int getSuite() const; std::string getName() const; bool getIfGiven() const; char getCard() const; void setGiven(bool x); void nameCard(); };

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture