For producing a pseudo-randomized list of playing cards (
Producing a decklist of shuffled playing cards.
This projects needs tkinter, pillow and supports-color. Tkinter should be included with most python distributions, pillow and supports-color are available via pypi.
To install dependencies globally
pip install pillow supports-color
A Pipfile is included for installing dependencies within a virtualenv
pipenv install
Running a script from the Pipfile
pipenv run cli
Running a file in the project
pipenv run card_shuffle.py
Outputs the list of cards to the terminal optionally with color and/or to a file.
$ python card_shuffle.py [-f, --four-color]
1) Two of Spade
2) King of Heart
3) Seven of Club
4) Ace of Diamond
....
52) Queen of Heart
$ python card_shuffle.py [-w,--write]
1) Three of Club
2) Ace of Spade
3) Two of Spade
4) King of Heart
....
52) Five of Heart
Decklist written to 'shuffled.decklist.txt'.
Using tkinter for display optionally with color and saving to an image with pillow
$ python card_shuffle.py [-g,--gui]
A demo that shows a deck in 'new deck order'
$ python card_shuffle.py [-n, --ndo]
$ python card_shuffle.py -h
usage: card_shuffle.py [-h] [-w] [-g] [-f] [-n] [-c] [-a]
Producing a pseudo-randomized list of playing cards.
options:
-h, --help show this help message and exit
-w, --write Flag to set for writing output to a text file.
-g, --gui Flag to set for displaying output using tkinter.
-f, --four-color Flag to set for displaying each suite in a unique color.
-n, --ndo Flag to set for displaying demo using tkinter. Other options are ignored when set.
-c, --cut Flag to set for cutting the deck after the shuffle at a consecutive pair if found.
-a, --arbitrary Flag to set for cutting the deck after the shuffle at a random spot.

