Giter Site home page Giter Site logo

blackjack-game's Introduction

Blackjack Game

This is a command line interface Blackjack game implemented in Python. The game uses classes for the Deck, Player, and Dealer, as well as a user interface module for input and output.

Installation

The Blackjack Game can be run directly from your command line without any additional installation.

You need to have python3 installed on your system, you can check this by running python3 -v on your command line. If python3 is not installed you can download it from the official website https://www.python.org/downloads/

Once you have python3 installed, you can start the game by running the main.py script on your command line.

To run the script open your command line, navigate to the directory where the game is located and run the following command:

python3 main.py This will start the game and you will be prompted to enter the names and initial balances of the players. Once the players are added, the game will begin.

You should be able to play the game on any system that supports python3.

Requirements

  • python3

How to Play

To start the game, run the blackjack.py script in your command line. The game will prompt you to enter the names of the players and their initial balances. Once the players are added, the game will begin.

Each round, players will be prompted to place their bets. The game will then deal two cards to each player and one card to the dealer. Players will have the option to hit, stand, split, or double down. If a player splits their hand, they will play each hand individually. If a player doubles down, they will receive one more card and their bet will be doubled.

After all the players have completed their turn, the dealer will play. The dealer will hit until their hand is worth at least 17 points. If the dealer busts, all remaining players win. If the dealer does not bust, the player's hands will be compared to the dealer's hand. If a player's hand is worth more than the dealer's hand, the player wins. If the player's hand is worth less than the dealer's hand, the player loses. If the player's hand is worth the same as the dealer's hand, it is a push and the player's bet is returned.

blackjack-game's People

Contributors

rickys93 avatar

Watchers

 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.