Skip to content
/ Shell21 Public

πŸƒ A recreation of the class blackjack card game, fully inside the terminal with local profiles to save your stats!

License

Notifications You must be signed in to change notification settings

GVonB/Shell21

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Shell21

πŸƒ A recreation of the classic blackjack card game, fully inside the terminal with local profiles to save your stats!

β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”
β”‚ S     β”‚β”‚ H     β”‚β”‚ E     β”‚β”‚ L     β”‚β”‚ L     β”‚β”‚ 2     β”‚β”‚ 1     β”‚
β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚
β”‚   ♦   β”‚β”‚   β™₯   β”‚β”‚   ♣   β”‚β”‚   β™    β”‚β”‚   ♦   β”‚β”‚   β™₯   β”‚β”‚   ♣   β”‚  // Terminal-Based Blackjack
β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚β”‚       β”‚
β”‚     S β”‚β”‚     H β”‚β”‚     E β”‚β”‚     L β”‚β”‚     L β”‚β”‚     2 β”‚β”‚     1 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”˜

This project was an interesting experiment that used only terminal output to display cards and allow users to play blackjack (also known as 21).

Users are prompted to enter their name as the key for their local profile. Stats including wins, losses, blackjack, win/loss ratio, games played, and "rank" are stored.

How To Play

  1. Clone the repository and navigate to the bin file in your terminal (or compile the src files on your own if you like).
  2. Ensure Java is installed and run java FrontEnd.
  3. Enter your profile/player name: Enter a name you would like to save your session's stats under.
  4. Sample hand:
Drew Card:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”
β”‚ A     β”‚
β”‚       β”‚  // Visual representation of your cards
β”‚   β™    β”‚
β”‚       β”‚
β”‚     A β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜
Drew Card:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”
β”‚ 3     β”‚
β”‚       β”‚  //
β”‚   β™    β”‚
β”‚       β”‚
β”‚     3 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜

Dealer drew a(n) Queen of Clubs              // Tell user what dealer drew

Your hand total is 14                        // Simple numerical hand total
Would you like to hit or stand (H/S)?        // Prompt to hit (draw) or stand
  1. Simply follow the prompts to play!

Rank Determination

Player Rank is rather arbitrary as it's linearly based on a player's win-loss ratio, starting calculation after 20 games played (5% margins for win/loss ratio).

Ranks
S - W/L Ratio >= 1
A - W/L Ratio >= .8
B - W/L Ratio >= .6
C - W/L Ratio >= .4
D - W/L Ratio < .4

Notes

While there are slight variations in blackjack rules across the world, this program requires the dealer to hit on a hand total of 16 or lower. Additionally, they will still hit when the dealer has a "soft" 17 (ace + 6). This may seem like a benefit to the player, but mathematically, hitting on a soft 17 increases the dealer's chance of winning.

About

πŸƒ A recreation of the class blackjack card game, fully inside the terminal with local profiles to save your stats!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages