Skip to content

victorr0/BlackJack-in-Python-OOP-with-GUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Languages