A package containing the logic for the card game Whist and its variants.
pip install whist
whist
contains a wide range of utility to work with playing cards and perform Whist game logic.
>>> from whist.cards import Deck
>>> deck = Deck.full_deck()
>>> deck.shuffle()
>>> cards = [card.symbol for card in deck.cards]
>>> print(cards[:3])
['π', 'π₯', 'π¦']
$ python -m whist.cli
=== 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: π«
>
Install pytest
(see requirements-dev.txt
).
Then
pytest