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 hashes)
Built Distribution
whist-0.1.0-py3-none-any.whl
(9.4 kB
view hashes)