DeckOfCards - v1.0

A multi purpose deck of cards. You can use it for playing solitaires or what ever you want to. I have included a simple help dialog that shows on startup but here is a list of commands:

  • F1 - Display the help text.
  • F2 - Collect cards and shuffle deck.
  • F3 - Setup for Klondike solitaire.
  • Arrow keys - Align selected cards.
  • Left mouse - Move or select cards.
  • Right mouse - Flip single or selected.
  • Middle mouse - Pick single card.
  • Mouse click shift - Collect selected cards.
  • Mouse drag shift - Layout selected cards.
  • Ctrl T - Toggle sticky cards.
  • Ctrl S - Shuffle selected cards.
  • Ctrl Z - Undo latest action.

The cards are "sticky" when you move a card, all cards on top of it will follow. A must for plying solitaires like Klondike.

Whats new?

There is alot of new functionalities but the biggest change is maybe that it's possible to select a group of cards. The coolest new feature would be the "Layout selected cards" feature. Select some cards, hold down shift, click on the selection and drag the mouse in any direction.

Screenshot

"Your deck, your rules."

Related links

  • Python - The python programming language.
  • PyGame - Game development for Python.

Downloads

Old release

Copyright notice

  • Card graphics are GPL and made by John K. Estell.
  • Source code are GPL and made by me (John Eriksson).

Comment this project:

Your name:
Your email (hidden):
Message:
Enter the validation code :
Private! (visible for webmaster only)

askrabal 2010-09-29 01:19:34

This is the best card game ever. I always hated not be able to finish a game of solitaire, now I can just shuffle the deck, or a hidden stack.

On another note...I'm new to python and started writing a cribbage game. I was hoping I could borrow most of your code for my game. Of course giving you all credit due.

Anderw Louder 2006-03-29 02:32:58

Is the python source available?
I downloaded the Windows Installer version and have found perl source to make a card GIFs.
Assuming the DeckOfCartds 1.0.tar.gz version is for linux? Is their a procedure to build the windows version under linux.

FYI. I have been thinking about making a simple black jack tutorial.

Answer:

The full sourcecode is available in DeckOfCards 1.0.tar.gz and can be run on all python/pygame platforms.

Anttu 2006-01-18 14:07:40

Man.. You is very good person many good things on this sight many good item for people like me =)

Anttu 2006-01-05 12:39:56

Amazing.. I've been working on EXACTLY the same idea, but multiplayer, with a complex card system that allowed me to shuffle, pick up and deal a group of cards instead of only the whole deck. Too bad it became too messy to continue it..