Skip to main content

Texas Hold'Em Lava Dome — terminal version

The third sibling to web/ (adenosine, browser) and wii/ (magnolia, C99). Runs entirely in a shell — no graphics, just characters.

Solo Hold'Em with no opponent. The dome charges an escalating ante each round and scores your hand against a threshold that climbs with it. Beat it and the stake comes back with a multiplier; miss and it is gone. Between hands you choose to bank chips — safe, and the bank is your score — or leave them in play for the next ante to eat.

pipx install magmacrunch-thld
lava-dome

pipx rather than pip because it puts the command on your PATH in its own virtualenv; plain pip install only reaches your PATH inside an activated venv. It is also a cabinet in the magmacrunch arcade — pipx install magmacrunch gets this and the other two — and plays identically either way.

For working on it:

pip install -e ".[dev]"
python -m lavadome        # or the installed `lava-dome` command
python -m lavadome --play           # skip the title screen
python -m lavadome --seed 42        # a reproducible shuffle
python -m lavadome --ascii          # suits as H/D/C/S, for fonts without ♥♦♣♠

Published as magmacrunch-thld — prefixed for the same reason as magmacrunch-george-boole; see that repo's PACKAGING.md. The import package stays plain lavadome.

Keys

← → adjust the bet
14 quick bet amounts
B / C bet / check for free (pre-flop)
Space take the next card
R / F raise / fold
K, 14 bank all / bank some
W withdraw from the bank
N / E next round / escape with what you banked
H, Esc, Q help, back, quit

A raise buys the next card, so a hand holds four betting decisions and never more. That is the web build's behaviour and the Wii port's; letting a raise stay on its street would be an open betting loop, which is a longer and different game.

Needs a terminal at least 58x22.

Launchable by an arcade

The game declares itself through an entry point, so anything enumerating magmacrunch.games finds it:

[project.entry-points."magmacrunch.games"]
thld = "lavadome.arcade:GAME"

It does not own the terminal. A texastoast.core.tui_host.TuiHost does, and LavaDomeApp is handed one — which is what lets the same code run as its own command and be seated by a launcher without knowing which happened. Esc from the title screen ends a standalone session and returns to the arcade menu under a launcher; the game just pops a scene and the host decides what that means.

How it is built

lavadome/
  cards.py     Card and Deck — ace-high, no rendering
  handeval.py  the poker evaluator
  config.py    the tuned numbers: antes, thresholds, payouts
  state.py     session and round state
  dealer.py    the deck and the four streets
  dome.py      ante, resolution, bust and escape
  betting.py   bet sizing, raises, banking
  theme.py     palette and card drawing, in character cells
  scenes.py    TitleScene, RulesScene, GameScene
  app.py       wiring: the game, the renderer, the scene stack

Everything above theme.py imports nothing outside the standard library — not texastoast, not Textual. A test enforces it. The engine is texastoast with its terminal backend, and the game draws through its Renderer/UISurface protocols rather than against Textual, so the planned hand-written ANSI backend will be a swap and not a rewrite.

Modality is the scene stack, not a flag: TitleScene sits at the bottom, a run pushes over it, and the rules screen pushes over whichever is showing.

Verifying the evaluator

The web build has no test suite — the Wii port's README calls that out as a problem, since it means the rules cannot be checked by agreeing with a reference.

tools/js_oracle.mjs stands in for one. It loads the actual shipped arcade/shared/adenosine-cards.js bundle in node, and tests/test_handeval.py runs both evaluators over thousands of random hands, comparing name, rank, points, tiebreakers and description on every one. That is the same method web/js/config.js records using when AdCards replaced this game's original evaluator: "Verified behaviourally identical over 20,000 random 2-7 card hands."

Those tests skip when node is absent; the hand-written cases still run.

Deliberate differences from web/

Both match what the Wii port already does, and both are recorded in wii/README.md.

  • Aces are high at construction, so there is no restamp step to forget. The web build deals from an ace-low Deck and restamps every card in Dealer._draw(), because the evaluator reads value off a card and never rewrites it. Get this wrong and a royal flush grades as an ordinary flush.
  • No burn cards. The web build discards one before the flop, turn and river. Off a freshly shuffled deck that cannot move any odds. It would matter only for replaying a seed against the browser, which is impossible anyway — the two use different random number generators.

One further difference, which is a fix rather than a taste call:

  • Hands resolve on the phase transition, not during a render. The web build calls resolveHand() from _phaseResolve(), a render function, and gets away with it only because resolving moves the phase on. A terminal redraws on every resize, so awarding chips from a render would be a live bug here.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

magmacrunch_thld-0.1.1.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magmacrunch_thld-0.1.1-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file magmacrunch_thld-0.1.1.tar.gz.

File metadata

  • Download URL: magmacrunch_thld-0.1.1.tar.gz
  • Upload date:
  • Size: 42.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for magmacrunch_thld-0.1.1.tar.gz
Algorithm Hash digest
SHA256 4bcbce45bde60e80d22f4c9a093e25f976d4bf84d4e050cb8f9281b2cc1be576
MD5 522772f4707423780b7579308a9de30d
BLAKE2b-256 9d86397c20837e8b9e8c5496a9bdfd37e8a477b7ce2e158ccb78dbcfb5d76c77

See more details on using hashes here.

Provenance

The following attestation bundles were made for magmacrunch_thld-0.1.1.tar.gz:

Publisher: release.yml on magmacrunchmedia/texas-holdem-lava-dome

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file magmacrunch_thld-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for magmacrunch_thld-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1073225f528df9816df465996b30443472ccbe96ac804457df0c50163b34e0df
MD5 9ccd799fa81aa4d85863f9ce5f53a43e
BLAKE2b-256 0ff211039f668facb4bd29d64f5bd8064a1920fb70dc635e4dc57a73b661e2fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for magmacrunch_thld-0.1.1-py3-none-any.whl:

Publisher: release.yml on magmacrunchmedia/texas-holdem-lava-dome

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

This release

0.1.1 This release

2 files

0.1.0

2 files

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