Skip to content

geytman/black-jack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Black Jack

Welcome to BlackJack Game! Get as close to 21 To win

  • deck cards have 52 cards .
  • Aces count as 1 or 11 .
  • At first player have 100 Chips .
  • Dealer hits until she reaches 17 .
  • Game Over if player have 0 Chips Or When player Decides to leave .

Game stages

  1. The player starts with 100 Chips , The player decides how much Chips to put on the table ,The player can not put more than he has ! .

  2. The player receives two cards randomly from the deck of cards

    ~ Player Hand  ~
    ~~~~~~~~~~~~~~~~
    ----------------
    | 7 Clubs      |
    ----------------
    ----------------
    | Q Hearts     |
    ----------------
    17
    
  3. The Dealer receives two cards randomly from the deck of cards, One that the player sees and the other the player does not see .

    ~ Dealer Hand  ~
    ~~~~~~~~~~~~~~~~
    ----------------    ---------------
    | 8 Hearts     |    |#############|
    ----------------    ---------------
    
  4. The player decides whether to take one more card from a card deck , if yes The player receives one more card from the deck of cards ,if not Dealer Play.

  5. The player now sees all the cards on the table .

    ~ Dealer Hand  ~
    ~~~~~~~~~~~~~~~~
    ----------------
    | 8 Hearts     |
     ---------------
    ----------------
    | 8 Diamonds   |
    ----------------
    16
    
  6. If the dealer has the sum of all the cards less than 17 dealer takes another card , if not The program checks who won , Who is closest to 21 .

  7. A player decides whether to play a new game ,Only if he has enough Chips to play .

Simulation of a program run

Welcome to BlackJack!
How many chips would you like to bet? you have now 100 
30

~ Dealer Hand  ~
~~~~~~~~~~~~~~~~
----------------    ---------------
| 8 Hearts     |    |#############|
----------------    ---------------

~ Player Hand  ~
~~~~~~~~~~~~~~~~
----------------
| 7 Clubs      |
----------------
----------------
| Q Hearts     |
----------------
17

You want to take another card : yes or no 
no

~ Dealer Hand  ~
~~~~~~~~~~~~~~~~
----------------
| 8 Hearts     |
 ---------------
----------------
| 8 Diamonds   |
----------------
16

~ Dealer Hand  ~
~~~~~~~~~~~~~~~~
----------------
| 8 Hearts     |
----------------
----------------
| 8 Diamonds   |
----------------
----------------
| K Spades     |
----------------
26
Dealer Lose

You'll want a new game : yes  / no 
no

Game End
you have 130 Chips in the End of the Game 

Releases

No releases published

Packages

No packages published

Languages