Usage

Getting started

Pycardgames simulates traditional card games using a 52 card deck from the command line. Make sure the package has been downloaded and installed (see Installation).

The program is started by typing pycardgames, followed by optional arguments, into your terminal. For the full command line arguments, see below, or pycardgames --help.

Example: Poker

To play any game, the most important arguments are the --game <game> and --player <player name> flags. For example, to start a game of poker, run:

pycardgames --game poker --player Tom --player Fred

At least two players are required for a game of poker, so the --player flag is used twice, adding a new player each time.

> There is currently no AI opponent, so both players must be played.

Command line arguments

usage: pycardgames [-h] [-g {snap,poker}] [-l LOADOUT] [-p PLAYERS] [-i]

Named Arguments

-g, --game

Possible choices: snap, poker

Specify a game, either to start up and play, or to read the game’s instructions

-l, --loadout

Resume a saved game (Not currently available)

Default: “new game”

-p, --player

Add a single player. (At least two players with unique names are required for a game.)

-i, --instructions

Print instructions for a specified <game>.

Default: False