Skip to main content

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.6

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

Built distribution (wheel)

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

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

Download URL hundredandten_deck-0.0.6-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5c93a97c4579cab1d8f2a453dbca1892e90ed2127822094631ef7c3f109ec3b
BLAKE2b-256 checksum
How to use checksums
dda6ff8c34c476655502b8816cc032e0e56f1c9a9c0a839359cf34003673fb32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}

Release history Release notifications | RSS feed

0.0.8

1 release file

0.0.7

1 release file

This release

0.0.6 This release

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

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