Coder Social home page Coder Social logo

blackjack-in-python-oop-with-gui's Introduction

BlackJack in Python

What is this?

This repository contains my Blackjack game. It's made in Python using Zelle's graphics.py. Some variables have Dutch names, but that shouldn't change the thrill of the game. This game is the result of the following assignment requirements:

Basis: Zelle, chapter 10, assignment 11, also assignment 12. Extends the "card" class of exercise 11 created using a method draw (self, win, center) that shows the map in a graphical window. Use this more extensive class to pull two cards randomly from a stick (of the 52 cards, so we play in contrast to the casino but with one deck at a time) and show these cards on the screen, with the total Blackjack value.

Winning conditions

Then the user can always choose "pass" or "draw" (make two buttons for this). If you fit you can earn dollars:

  • 21: 10 dollars
  • 20: 5 dollars
  • 19: 3 dollars
  • 18: 2 dollars
If the total Blackjack value exceeds 21, you lose 3 dollars and start a new game. On the screen, always see what the total score in dollars so far is. Also, provide a "quit" button that lets you stop.

Alt text

Requirements

All the classes for the objects needed are in the repository, including the dependancy for the GUI Zelle's graphics.py, wich is a wrapper around Tkinter.

  • Python 3.+

Playing the game

Clone this repository

git clone https://github.com/victorr0/BlackJack-in-Python-OOP-with-GUI.git

Start the game with the command, gamble responsibly ;-) :

python3 BlackJack.py

blackjack-in-python-oop-with-gui's People

Contributors

victorr0 avatar

Watchers

James Cloos 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.