Code Monkey home page Code Monkey logo

blackjack-'s Introduction

Blackjack-

A simple version of the card game Blackjack with python using OOP

The objective of the game is to beat the dealer by having a hand value of 21 or as close to 21 as possible, without going over.

Here's how the game is played:

  • Each player is dealt two cards, face up. The dealer is also dealt two cards, but only one is face up while the other is face down.
  • The players look at their cards and decide whether they want to "hit" (take another card) or "stand" (keep the current hand). Players take turns hitting or standing until they either have a hand value of 21 or they have gone over 21 and "busted".
  • Once all players have completed their turn, the dealer reveals their second card. The dealer must hit until their hand value is at least 17, and then they must stand.
  • If the dealer busts (goes over 21), then all remaining players win. If the dealer does not bust, then the player's hands are compared to the dealer's hand, and the player with the highest hand value that is less than or equal to 21 wins.
  • If a player has a hand value of 21 with their first two cards (an Ace and a 10-point card, such as a 10, Jack, Queen, or King), this is called a "blackjack" and the player automatically wins, unless the dealer also has a blackjack, in which case it is a tie.

blackjack-'s People

Contributors

dikshikaaa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.