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

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.0
File Size Uploaded Provenance
magmacrunch_threes-0.2.0.tar.gz 26.5 kB With provenance Details

Built distribution (wheel)

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

Total release size: 48.6 kB

Release files / magmacrunch_threes-0.2.0.tar.gz

Download URL magmacrunch_threes-0.2.0.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a539dbb9f346124fc7a9dad28b52f79c8c6178ebb5b5d96c0cb558c7928b870f
BLAKE2b-256 checksum
How to use checksums
761271799aa7fada24798cf6d2fabb4aea8b58f9273efbbbe3895fbed976781e
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 21, 2026.

Transparency log

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

Download URL magmacrunch_threes-0.2.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e98008678829ba99a16cf70ac0b82cf3091b461d2100c218a660f063f4587fd
BLAKE2b-256 checksum
How to use checksums
e3f7735058a8e8694bde8a7dd7ae4ac9b303a4e63d8734603823984b5e5b255a
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 21, 2026.

Transparency log

Security for magmacrunch-threes 0.2.0

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.0.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 21, 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