Skip to main content

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


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)

Uploaded Source

Built Distribution

whist-0.1.0-py3-none-any.whl (9.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page