Skip to content

A simple command-line Blackjack game implemented using Python and Object Oriented Programming concepts

Notifications You must be signed in to change notification settings

sheetalbongale/Blackjack-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Game ♠️♥️♣️♦️

Submitted by : Sheetal Bongale | Feb 23, 2020

A simple command-line Blackjack game using Python implementing Object Oriented Programming concepts.

Run Instructions

> git clone https://github.com/sheetalbongale/Blackjack-Python.git

> python blackjack.py or in ipython: %run blackjack.py


Objective of the game

Each player attempts to beat the dealer by getting a count as close to 21 as possible, without going over 21.

Card values

  • An ace is worth 1 or 11.
  • Face cards are 10
  • Any other card is its pip value.

Game key terms

  • Hit: To 'Hit' is to ask for another card.
  • Stand: To 'Stand' is to hold your total and end your turn.
  • Bust: If your card total goes over 21 you bust, and the dealer wins regardless of the dealer's hand.

Dealing

Each player starts with two cards, one of the dealer's cards is hidden until the end.

Player's Turn

After the first round of dealing, each player has the option to hit (receive more cards) or stay (no more cards). If hitting results in the player busting (total going over 21), then his or her bet is lost.

Dealer's Turn

After all the players are done hitting/staying, the dealer flips over his hidden card. If the dealer’s total is less than 17, then he or she needs to hit (receive a new card). This process repeats until the dealer’s hand either totals to 17 or more or busts (goes above 21).

About

A simple command-line Blackjack game implemented using Python and Object Oriented Programming concepts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages