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

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.8
File Interpreter ABI Platform
hundredandten_deck-0.0.8-py3-none-any.whl Python 3 none any Details

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

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

This release

0.0.8 This release

1 release file

0.0.7

1 release file

0.0.6

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