Skip to content

jessiets/Black-Jack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

The Game of Black Jack

Let's play Black Jack with the computer!

This program is a virtual stimulation of the game - Twenty One.


About

  • The game allows one player to play against the dealer (computer).
  • Normal black jack rules apply.
  • The program will print out the game result along with the final scores.

    Rules

  • Goal:
    Player should aim to have their cards total more than the dealer's without going over 21, which is called a "bust". The value of each card corresponds to its number value, whereas Jacks, Queens, and Kings have a value of 10. Aces are special cards, it can either have a value of 1 or 11, the value depending on whether the total card value would still be within 21 after the addition of ace. In other words, if ace with a value of 11 will cause the player's hand to "bust," ace will automatically be counted as a value of 1.
  • Setup:
    This program uses one deck of playing cards (52 cards). The player and dealer will each randomly get 2 cards. All of the player's cards will be visible on the screen, but the dealer will only reveal one card and keep the other one hidden from the player.
  • How to Play:
    The player has two options in each round: to "stand" or to "hit." Stand is equivalent to passing the current round, not asking for another card. Hit is to ask for another card. As stated, the goal of the player is to get closer to 21 but not over 21. Once the player chooses to "stand," the dealer starts to play. The dealer's hidden card is now revealed. The dealer must continue to take a card until the total is 17 or more, at which point the dealer must "stand." Now, this is the point where whoever has the highest score wins.
  • How does the game end:
    If player goes bust, the game immediately ends and the dealer wins.
    If dealer goes bust, the game immediately ends and the player wins.
    If both the player and the dealer called to "stand" and both are still under value of 21, compare the points and the person with the higher total point value is the winner.

    Implementation

  • for loops and while loops
  • conditional statements
  • function prototypes, function definitions, function calls, passing parameters
  • array, array search
  • clear, table formatted output
  • About

    No description, website, or topics provided.

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published

    Languages