Blackjack is a popular card game where the player aims to get a score closer to 21 than the dealer without exceeding this value.
Cards: Cards 2-10 are worth their face value. Jack, Queen, and King are worth 10 points. Ace can be worth 1 or 11 points.
Gameplay: The player and dealer each receive two cards. The player sees one of the dealer's cards.
Player's Turn: The player can draw cards or stand.
Dealer's Turn: The dealer must draw cards until they reach at least 17 points.
Result: The player with the higher score without exceeding 21 wins.
Balance: The player starts with a set balance and can place bets on individual rounds.
Error Handling: The game handles incorrect input and invalid bets.
Game Continuation: After each round, the player can choose to continue or end the game.
I wrote this game to practically apply my knowledge of the Julia language. It was my first larger application in Julia, which I created a few months ago.
Windows:
winget install julia -s msstore
Mac:
curl -fsSL https://install.julialang.org | sh
cd Blackjack
julia --project=.
using Blackjack
play()