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:

  • Three new tiles in four are 1s (75% 1, 15% 2, 10% 3), and a 1 merges only with a 2, so the board fills with 1s and a game lasts a few dozen moves. The original Threes! deals 1s and 2s about evenly.
  • The score is the sum of every merge, not the original's powers of three.

Change either 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.2

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.2
File Size Uploaded Provenance Actions
magmacrunch_threes-0.2.2.tar.gz 24.4 kB With provenance Details for magmacrunch_threes-0.2.2.tar.gz

Built distribution (wheel)

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

Total release size: 46.5 kB

Release files / magmacrunch_threes-0.2.2.tar.gz

Download URL magmacrunch_threes-0.2.2.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d3ee5fe9e430f31c6e4f0319c27a12d8dab09973d631fe2275c47028efe10d2a
BLAKE2b-256 checksum
How to use checksums
2732a2ef044ed92ea7d4e683fa1911c9816e7edcbb9477de364c0b9f4f3a4034
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 Oct 27, 2026.

Transparency log

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

Download URL magmacrunch_threes-0.2.2-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48a0c81e55676532eff3e1773915fd3fe979ec9e91360595c2c2ce21f9c8b54d
BLAKE2b-256 checksum
How to use checksums
b1a842dd860fc080aee500560b4eec9c400a9dee5412eca1073e8f87c60fba1a
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 Oct 27, 2026.

Transparency log

Security for magmacrunch-threes 0.2.2

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.2.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 Oct 27, 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