Tk Project #6

Introduction

Create simple card games using tkinter and images of playing cards. Some sugestions are show below.

Pillow

Uses Pillow to manipulate/display images (PIL is a discontinued project)

--- remove PIL if installed

sudo apt-get remove python-pil
sudo apt-get remove python3-pil
sudo pip remove PIL
sudo pip3 remove PIL

--- install Pillow

sudo pip install Pillow
sudo pip3 install Pillow

Things To Do Before Creating Games

1. Search the web for free playing card images. Download them for use in the card games.

2. Create the capability to determine the values of the cards (images).
(For example: card = face value, K,Q,J = 10, A = 1 or 11)
(Store in Python list? dictionary?)

3. Create a deck-shuffling capability. (cards in random order)
(search the web for an algorithm? function? ...?)

3. Create a way to display card faces. (see tkinter image examples)

4. On a piece of paper, sketch the layout for a game.
Create the GUI layout with blank areas and non functional buttons.
Then add the display cards and game code.

Note: Each game should have a quit button.

Game #1

Create a simplified game of 21.

Note: To start with, simplify things with the ace worth only 11 point. When the game is working, add the ace being 1 or 11 points.

Game #2

Create a simplified game of war.

1 What do you do with ties?