Skip to main content

Whot

An implementation of the Whot game. The app is a web application that currently uses vanilla JS for the frontend and Python for the backend. The communication protocol used for the application is WebSocket.

Background

Whot is a popular card game first developed by William Henry Storey in the 1930s. The popularity of the game grew in Britain before finding its way to Nigeria, where it became the most popular card game in the country.

How it's played

Whot game play

The game of Whot consists of two or more players. Each player is dealt a certain number of cards at the beginning of the game. The player can only see their own card and can't see their opponents' cards.

There's a play pile where the user drops their card on, there's also a general market from which users draw new cards during game play.

The players take turns playing their card to the play pile. Any card a user drops on the play pile should be of the same suit or number as the current card on the pile. If they don't have any card of the same suit or number, the player has to go to the general market.

A winner is declared when one of the players no longer has any card at hand.

Cards

Whot cards

The Whot card consists of 5 suits that come in the form of shapes:

  • Cross
  • Square (also known as Carpet)
  • Star
  • Circle (also known as Ball)
  • Triangle (also known as Angle)

The cards of the suits are numbered, ranging from 1 to 14. There's also a special card called the Whot Card that belongs to the Whot suit, and its number is 20.

Special Cards

In the original version of Whot, there was only one special card, the Whot Card . This card could be placed on the pile at any time. When placed, the user can request a card of a particular suit of their choice.

In the Nigerian version, extra special cards were introduced. These special cards were mostly designated based on their number, not suit.

Card Effect Explanation
1 Hold on The current player can play again with a card of the same suit as the 1 card.
2 Pick two The next play is asked to pick two cards from the general market. It can be defended with another card with the number 2. The picking of two cards is then transfered to the player after them.
5 Pick three The next play is asked to pick 3 cards from the general market. It can be defended with another card with the number 5. The picking of three cards is then transfered to the player after them.
8 Suspension The next player is told to abaddon their turn and give it to the player after them.
14 Go Gen All players apart from the current player is made to draw a card from the general market.

Usage

To use this you need Python 3.11 or higher. Other lower versions of Python might work but I haven't tested them.

pip install whot

Go through the documentation to learn more.

Contributions

This code base is open to contributions. To contribute, check out the issues of the repo. Pick an issue you want to resolve and drop a comment to express your interest in resolving the issue. If there's no issue, you can create an issue that you can resolve yourself or let someone else resolve it.

If you want to make contributions, first you have to fork the repo. Make your changes to your fork, then open a PR.

Resources

Useful resources about the game of whot.

Metadata

Release files for whot 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whot 0.0.6
File Size Uploaded Provenance Actions
whot-0.0.6.tar.gz 17.6 kB Without provenance Details for whot-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for whot 0.0.6
File Interpreter ABI Platform Actions
whot-0.0.6-py3-none-any.whl Python 3 none any Details for whot-0.0.6-py3-none-any.whl

Total release size: 28.9 kB

Release files / whot-0.0.6.tar.gz

Download URL whot-0.0.6.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ab3fd4a84a38459bd2f7ec2e0003ddb0aad9aedba5e155fb905e865592ceab84
BLAKE2b-256 checksum
How to use checksums
bd695daa975428bb1ccf5f4bf49b4d12e1aa9e1deaa4affc965211d47ba542a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.7

Release files / whot-0.0.6-py3-none-any.whl

Download URL whot-0.0.6-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2153c51b4f4460934139e19843da495c135e868a0a8d6ab3cd12cdffe1572827
BLAKE2b-256 checksum
How to use checksums
603da58156b81e52958ec992b5fda787b7c920cee04b4d44b1684023c5271a07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.7

Security for whot 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page