15 PUZZLE (terminal)
The classic sliding tile puzzle in a terminal, from the 8 puzzle on 3x3 to the
35 puzzle on 6x6. The third version beside web/ and wii/, 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]"
fifteen-puzzle # or python -m fifteen
fifteen-puzzle --size 3 --play
Keys
| key | |
|---|---|
| arrows (or WASD, hjkl) | slide the tile beside the gap that way |
| left / right on the title | choose the size, 3x3 to 6x6 |
R |
reshuffle |
Esc |
the title (from the title, back to the arcade) |
Q |
quit |
Put the tiles in order, 1 to N row by row, with the gap bottom right. The score is the move count, so fewer is better; the time is kept beside it.
It is the browser's game
fifteen/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 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, shuffles and plays a
hundred and thirty games through the game's own handleMove(), every size
mashed and thirty 3x3s solved outright by a breadth-first search, and the test
replays every move through the port and requires the same board, move count
and result after each one. So the shuffle is the browser's too, draw for draw.
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.
Scores are filed the browser's way: one board, fifteen-puzzle, with the size
and the time beside each score, and a top ten per size, fewest moves first. A
run is filed only if it makes its size's ten, as the browser files only what it
asked a name for.
Fewer is better, which the engine has to be told. The cabinet declares
lower_is_better, and needs magmacrunch 0.13.0 or later for it: an older
engine would keep the worst runs and show the longest solve on the arcade floor
as BEST.
Needs a 68x21 terminal, which is what the 6x6 takes; the smaller boards draw in less.
Licence
PolyForm Noncommercial 1.0.0, as the rest of this repository. See NOTICE.
Metadata
Release files for magmacrunch-fifteen-puzzle 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| magmacrunch_fifteen_puzzle-0.1.0.tar.gz | 26.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| magmacrunch_fifteen_puzzle-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.6 kB
Release files / magmacrunch_fifteen_puzzle-0.1.0.tar.gz
| Download URL | magmacrunch_fifteen_puzzle-0.1.0.tar.gz |
|---|---|
| Size | 26.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e2fd431ab1f3ad0e7e02adee5f5396d9dbc8a73ecb8ef4c80b44113265a080e
|
|
BLAKE2b-256 checksum How to use checksums |
5616486bc6654f853a193418fa254927799cadb78ac2154a5e9b6f3fb0c950cc
|
| 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 logRelease files / magmacrunch_fifteen_puzzle-0.1.0-py3-none-any.whl
| Download URL | magmacrunch_fifteen_puzzle-0.1.0-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91a19a925155eedf1bb788c00c7bd4d040eb7020fc5e91dcc5ba8dee5994bea0
|
|
BLAKE2b-256 checksum How to use checksums |
ca7baef56cb38f879a3c398d263c5708ee41cfa9952fad92af975b32417c803c
|
| 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 logSecurity for magmacrunch-fifteen-puzzle 0.1.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.
Attestation for magmacrunch_fifteen_puzzle-0.1.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 logA 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.