Generating cards for a game

Allan M. Stavely

January 17, 2006; last revised May 2, 2006

Table of Contents

1. Introduction
2. Generating and printing the cards
2.1. Pages
2.2. Cards
2.3. The output as a whole
3. A family of simple rummy games
3.1. Design of the cards
3.2. A deck of cards

1. Introduction

This is a program to generate playing cards for home-made card games. In Section 2 we define classes and methods for generating such cards; this code might have other applications, such as generating tickets for a performance, or flash cards for arithmetic or foreign-language drill. In Section 3 we show an example of generating cards for a simple kind of rummy-like game.

The programming language is Python.