A package containing the logic for the card game Whist and its variants.
Project description
pywhist
A package containing the logic for the card game Whist and its variants.
How to install
pip install whist
How to use
whist contains a wide range of utility to work with playing cards and perform Whist game logic.
Playing with cards
>>> from whist.cards import Deck
>>> deck = Deck.full_deck()
>>> deck.shuffle()
>>> cards = [card.symbol for card in deck.cards]
>>> print(cards[:3])
['๐', '๐ฅ', '๐ฆ']
Interactive play
$ย python -m whist.game
=== Turn: north ===
east: ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐
south: ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐
west: ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐ ๐
Your partner: south
Pile:
Your hand: ๐ ๐ ๐ ๐ ๐ ๐ ๐ด ๐น ๐บ ๐ฝ ๐ข ๐ฉ ๐ซ
Actions:
0: ๐
1: ๐
2: ๐
3: ๐
4: ๐
5: ๐
6: ๐ด
7: ๐น
8: ๐บ
9: ๐ฝ
10: ๐ข
11: ๐ฉ
12: ๐ซ
>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
whist-0.1.0.tar.gz
(8.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
whist-0.1.0-py3-none-any.whl
(9.4 kB
view details)
File details
Details for the file whist-0.1.0.tar.gz.
File metadata
- Download URL: whist-0.1.0.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
714da2e6983b5a30fcc29e5449b0cbb8a5f85a1e724a4356f5f952404e6ac832
|
|
| MD5 |
803f901250f0ac7d57640b545f61d649
|
|
| BLAKE2b-256 |
68c44bb65b903ce30733d6dc9837fc1173ab1f4e66a3bdac541eb72ee5fd22d1
|
File details
Details for the file whist-0.1.0-py3-none-any.whl.
File metadata
- Download URL: whist-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.8.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1358ae4f22c680b2041562a4026b8f059cfaa071a81889c5771ab1e0ff839ff
|
|
| MD5 |
de0cd54bb9b61486eb770e35acc509bb
|
|
| BLAKE2b-256 |
715b11a6d0f8fbad214238b7a922260b0d964496edef45fdf91303c03608e479
|