Skip to main content

THREES (terminal)

Slide, merge, survive, in a terminal. The second version of the game beside web/, on the magmacrunch engine's terminal backend: a cabinet in the magmacrunch arcade and its own command, the same either way.

pip install -e ".[dev]"
python -m threes

Keys

key
arrows (or WASD, hjkl) slide every tile one step
R new game
Esc the title (from the title, back to the arcade)
Q quit

1 + 2 makes 3, and from there same plus same; 1 + 1 and 2 + 2 do not merge. The new tile comes in on the edge you slid away from, and lights up for a moment so you can see where it landed.

It is the browser's game

threes/rules.py is web/js/game.js plus the part of adenosine-puzzle's createGame it relies on: a move is the left slide with the board rotated round it, and only a move that changed something brings a tile and counts. tests/test_oracle.py checks it: tools/js_oracle.mjs loads the website's adenosine-puzzle.js and web/js/game.js unmodified with Math.random seeded, plays 300 games through the game's own handleMove(), and the test replays every move through the port and requires the same board, score and move count after each one, and the same answer to whether it moved at all.

The oracle needs the website, for the bundle. It finds it the way tools/link-shared.mjs does: ../shared, $WEBSITE, ../../website, ../../../web/website. CI checks the website out beside the game.

The browser's choices are copied rather than improved, because both versions share a scoreboard and a rule changed in one would make its scores mean something else:

  • The score is the sum of every merge, not the original's powers of three.
  • Tiles slide by scanning each row once, left to right.

The tiles themselves are dealt as the original deals them: from a shuffled bag of twelve, four each of 1, 2 and 3, refilled when it runs out.

Change any of this in web/js/game.js and here together, and the oracle will hold the two to each other.

Needs a 67x21 terminal.

Licence

PolyForm Noncommercial 1.0.0, as the rest of this repository. See NOTICE, which also says whose the name is.

Metadata

Release files for magmacrunch-threes 0.2.3

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

Source distribution (sdist)

Source distribution for magmacrunch-threes 0.2.3
File Size Uploaded Provenance Actions
magmacrunch_threes-0.2.3.tar.gz 25.7 kB With provenance Details for magmacrunch_threes-0.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for magmacrunch-threes 0.2.3
File Interpreter ABI Platform Actions
magmacrunch_threes-0.2.3-py3-none-any.whl Python 3 none any Details for magmacrunch_threes-0.2.3-py3-none-any.whl

Total release size: 48.4 kB

Release files / magmacrunch_threes-0.2.3.tar.gz

Download URL magmacrunch_threes-0.2.3.tar.gz
Size 25.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a53c13b2a22ceadcee27259f6be6c8ae6ac7b77bf1a31a5a7fc9f5dc0b916725
BLAKE2b-256 checksum
How to use checksums
94c9bc196002090bf60d63aac52a837fb3d3e007d70817986df9fd84d1d61564
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Release files / magmacrunch_threes-0.2.3-py3-none-any.whl

Download URL magmacrunch_threes-0.2.3-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c440b2bc022a23eb1f7f681475f3c97136e1d3345713d128a423bd47e6e2c5b
BLAKE2b-256 checksum
How to use checksums
06d2f7832c715691c62dfdf40df3d9932bab38f7cb73b590df05a5054bd7112f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

Security for magmacrunch-threes 0.2.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for magmacrunch_threes-0.2.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 8, 2026.

Transparency log

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