Code Monkey home page Code Monkey logo

python_blackjack's Introduction

Simple Terminal Python Blackjack

Welcome to a simple Blackjack game. This is a Python implementation of a one player (dealer being the CPU) Blackjack game with very simple rules.

Simple Blackjack Gameplay

  1. Dealer are dealt two cards, one of which is a face up card known to the player
  2. You are dealt two cards, face up
  3. If one of the initial hands are a Blackjack (21) then the player with 21 wins Sidenote: Player are always checked first.
  4. If your hand total score is lower than 21, you may hit, stand, or just quit the game. Hitting: Add an extra face up card to your hand Standing: Do nothing Quit: Quit the game Sidenote: Press H to hit, S to stand, or Q to quit, any other commands are regarded as stands
  5. Dealer's hitting logic is standard, if dealer's hand total is below 17, keep hitting
  6. Compare final score, player still get a priority check.

How to run?

Make sure to have Python3 installed. You can use virtualenv to generate a fully detachable Python3. Afterwards no extra packages are needed. Please download virtualenv if you do not have Python3+.

git clone https://github.com/aulb/python_blackjack cd python_blackjack virtualenv --no-site-packages -p python3.6 venv source venv/bin/activate python OnePlayerBlackjack.py

To deactivate/escape the virtual environment just simply type deactivate.

python_blackjack's People

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.