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

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.1
File Size Uploaded Provenance
magmacrunch_threes-0.2.1.tar.gz 24.4 kB With provenance Details

Built distribution (wheel)

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

Total release size: 46.5 kB

Release files / magmacrunch_threes-0.2.1.tar.gz

Download URL magmacrunch_threes-0.2.1.tar.gz
Size 24.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3b820e8136de009b0d3bebb399091aa163bde5b4790afc98f7c44d7fb099fc5c
BLAKE2b-256 checksum
How to use checksums
3ad00d795e2767f52b3a106a269889b271204acf1f273ae0df56c7ac5bdccd4d
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 22, 2026.

Transparency log

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

Download URL magmacrunch_threes-0.2.1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ac732f7942ecea8d3ee66d464d2d609594b5dbdae76bf5f32068b072f1d2bdfe
BLAKE2b-256 checksum
How to use checksums
77618cd6d94c4588e5f4cbfbab485fe8cfac87e7bf2471225f372b6c4cdd4524
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 22, 2026.

Transparency log

Security for magmacrunch-threes 0.2.1

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for magmacrunch_threes-0.2.1.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 22, 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.

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