C++ implementation of Blackjack using polymorfism
Blackjack, also known as twenty-one, is the most widely played casino banking game in the world. Blackjack is a comparing card game between a player and dealer, meaning players compete against the dealer but not against other players. It is played with one or more decks of 52 cards. The objective of the game is to beat the dealer in one of the following ways:
- Get 21 points on the player's first two cards (called a "blackjack" or "natural"), without a dealer blackjack;
- Reach a final score higher than the dealer without exceeding 21; or
- Let the dealer draw additional cards until his or her hand exceeds 21.
The player or players are dealt a two-card hand and add together the value of their cards. Face cards (kings, queens, and jacks) are counted as ten points. A player and the dealer can count an ace as 1 point. All other cards are counted as the numeric value shown on the card. After receiving their first two cards, players have the option of getting a "hit", or taking an additional card. In a given round, the player or the dealer wins by having a score of 21 or by having the higher score that is less than 21. Scoring higher than 21 (called "busting" or "going bust") results in a loss. A player may win by having any final score equal to or less than 21 if the dealer busts.
- Single deck
- Basic play only(Hit/Stand)
- Hit: Take another card from the dealer.
- Stand: Take no more cards, also known as "stand pat", "stick", or "stay".
To open this Qt project on your PC you need to download the program Qt. This link will redirect you to the page where you can download the program --> https://www.qt.io/download . Once the program is downloaded and you completed the setup, you need to select the project to open it in the Qt maker. Once the project openend, you can run the program by clicking on the green play button at the bottom left corner of the Qt program. This is how you open the BlackJack project in a Qt program.