hundredandten-deck
Card domain primitives for the game Hundred and Ten. This package has zero dependencies and is used by all other packages in the workspace.
from hundredandten.deck import Card, CardSuit, CardNumber, Deck, SelectableSuit
deck = Deck()
hand = deck.draw(5)
trump = SelectableSuit.HEARTS
for card in hand:
print(card, card.trump_for_selection(trump))
Exports
| Symbol | Description |
|---|---|
Card |
Frozen dataclass for a single playing card. Fields: number (CardNumber), suit (CardSuit). Properties: trump_value, weak_trump_value, always_trump. Method: trump_for_selection(trump). |
CardSuit |
Enum of suits: HEARTS, DIAMONDS, SPADES, CLUBS, JOKER. |
CardNumber |
Enum of card values: TWO through ACE plus JOKER. |
SelectableSuit |
Enum of the four choosable trump suits: HEARTS, DIAMONDS, SPADES, CLUBS. |
ALL_CARDS |
list[Card] — all 53 cards in the deck (52 standard + Joker), in a fixed order. |
Deck |
A seeded, shuffled deck. Construct with an optional seed string; call deck.draw(n) to pull n cards. |
Card Values
Two card value scales exist:
trump_value— used when the card's suit is the selected trump suit (or the card is always-trump). Higher is better.weak_trump_value— used when the card leads a trick with no trumps played. Higher is better.
Black suits (Spades, Clubs) have reversed number card ordering in both scales — a lower pip value beats a higher one.
The Ace of Hearts and the Joker have always_trump = True, meaning card.trump_for_selection(any_suit) returns True regardless of what suit is chosen.
Metadata
Release files for hundredandten-deck 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hundredandten_deck-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Release files / hundredandten_deck-0.0.5-py3-none-any.whl
| Download URL | hundredandten_deck-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1262d60dbdbd7b8f4980ae6b9c2d273ed07787b5c4dbe4650e34f642ef56473
|
|
BLAKE2b-256 checksum How to use checksums |
72bcb2bdcaa8605bde6bb0e6d9535f1c9cf2bbe52d905547a985acdc00f1e6f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|