LEARNING OUTCOMES
- How to create an application using the .NET framework
- How to create an image to run as a containerized application using Docker
- How to host a database on Amazon Web Services
- How to manage a database on MS SQL Server Manager
- How to securely store sensitive data in databases
- How to execute SQL queries on a connected database in a .NET application
- How to produce self-contained releases of an application
- How to use the Tuple data structure
- The use of C# Dictionaries
- The use of methods to simplify code
- Returning multiple values from a method
- Use of the Visual Studio/VSCode debugging tool
- Data parsing
- Program flow control
OVERVIEW
Console-based blackjack card game developed in the .NET framework and programmed in C#.
GAMEPLAY
To launch the game:
- Download the .ZIP folder in the latest release for your respective OS
- Unzip the folder in your desired location
- Run the Blackjack application
Alternatively:
- Clone the project into a folder on your computer
- Open the project folder in a new terminal in Visual Studio
- Run dotnet build
- Then dotnet run
MAIN MENU
Upon entry, player will be notified of their initial balance of $5000.
The player will have the choice to pick from three (3) different casinos:
- Las Vegas (Min. $50)
- Monte Carlo (Min. $200)
- Dubai (Min. $200)
Player will also have the option to quit (Q) the game.
INSIDE THE CASINO
Once the preferred casino is selected, player is prompted to enter a bet within the accepted value range or to exit (Q) the casino.
Once a valid bet is placed, the program begins to deal the player and dealer their hands in an alternating fashion.
INSURANCE
Once the cards are dealt and in the event that the dealer's first card is an Ace (where the player does NOT have a blackjack), the player has the ability to bet Insurance.
- The player is able to bet up to half of their original bet or 0 if they do not wish to take insurance.
- If insurance is taken and the player wins, they will receive their original bet and 2x their insurance.
- If insurance is taken and the player loses, they will lose their original bet and their insurance.
- If insurance is not taken, the game will continue.
BLACKJACK
Before the program continues, it checks to see whether the player or the dealer have a blackjack.
- If either the player or the dealer have a blackjack, the player will be notified and the round will end.
- In the event that both the player and the dealer have a blackjack, the program will notify the player that there is a Push.
THE PLAYER'S TURN
Once the cards are dealt, player is shown their hand, the total of their hand, and the dealer's hand.
They are then given the option to Hit or Double or Stay. (Players may only double down once on their first turn. Players will NOT be able to double down after hitting a card)
Hit : A random card is drawn into the player's hand
If the player does not bust:
- The sum of the player's hand is updated
- Player is given the option to Hit or Stay
- This process is repeated until the player busts or decides to stay
If the player busts:
- Player is notified they busted along with the total of their hand
- Player's balance is updated
- Player is then redirected to beginning where they can choose to bet again or exit the casino
Split : Player has the ability to split their hand should their initial drawn cards equal in value.
Double : Player will be given the opportunity to double their bet and draw only one (1) card.
Stay : Player does not draw a card and the program proceeds to play the dealer's hand
THE DEALER'S TURN
Once the player decides to stand with their hand or doubles down without busting, the dealer begins to draw cards.
The dealer will continue to draw cards until they either land on at least a soft 17 or bust, which then the program will determine the winner.