NELIKKO (terminal)
Helsinki, 1989, 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.
pipx install magmacrunch-nelikko
nelikko
For working on it:
pip install -e ".[dev]"
python -m nelikko
Keys
| key | |
|---|---|
← → (or A/D) |
siirrä, slide. Hold to keep sliding |
↑ (or W, X) |
käännä, turn clockwise |
↓ (or S) |
pudota, down a row |
SPACE |
heitä, drop |
C |
pidä, hold |
P |
tauko, pause |
R |
restart |
Esc |
the title (from the title, back to the arcade) |
Q |
quit |
Every control is a press, so a terminal plays this the way a browser does. Holding an arrow is the terminal repeating it, which stands in for the browser's own auto-shift; it starts a little later than the page's 170 ms, and that is the only difference you can feel.
It is the browser's game
nelikko/rules.py is the rules from web/game.js, which keeps them in one
file with the canvas and the page. tests/test_oracle.py checks the port
anyway: tools/js_oracle.mjs loads web/game.js unmodified with the page
stubbed out, plays it through its own update(), and the test replays every
op through the port and requires the same well, piece, score, level and clock
after each one. Ten games, about 25,000 ops, up to level 20.
Two things the browser does oddly are copied rather than fixed, because both versions share a scoreboard and a rule fixed in one would make its scores mean something else:
- Levels 2 and 3 fall slower than level 1 (915 and 830 ms against 800).
Level 1's interval is a literal and the rest come from
1000 - (level - 1) * 85. - A piece swapped out of hold is not checked for room at the spawn point.
Both are pinned in tests/test_rules.py by name. Fix them in web/game.js
and here together, and the oracle test will hold the two to each other.
Scores go to the board the browser already has, which is still called
tetris from before the rename. That is deliberate (see ../AGENTS.md) and
never shown.
Characters
Every glyph is in the engine's degradation table except the Finnish ä in
PIDÄ and the tagline. cp1252 and cp437 both carry it, so in practice it draws
everywhere; what it lacks is an ASCII stand-in under --ascii. The engine's
nordic group (magmacrunch-media/magmacrunch#4) adds one. Once a release
carries it, raise the magmacrunch floor here and drop FINNISH from
tests/test_app.py.
Needs a 52x22 terminal.
Licence
PolyForm Noncommercial 1.0.0, as the rest of this repository. See NOTICE.
Metadata
Release files for magmacrunch-nelikko 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_nelikko-0.1.0.tar.gz | 25.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| magmacrunch_nelikko-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.6 kB
Release files / magmacrunch_nelikko-0.1.0.tar.gz
| Download URL | magmacrunch_nelikko-0.1.0.tar.gz |
|---|---|
| Size | 25.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1a89db91afab3d8a08002958dc4eadfea25ba5e10b1339d42fcfc7d3faef2fd
|
|
BLAKE2b-256 checksum How to use checksums |
834374016db109a2d75fe4af6194aff8b44d7ce3e7805b335de072382218d523
|
| 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 18, 2026.
Transparency logRelease files / magmacrunch_nelikko-0.1.0-py3-none-any.whl
| Download URL | magmacrunch_nelikko-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
658449014cad1e435c2bed9481e036ff6a56663f3351d614e90b20612c753ed0
|
|
BLAKE2b-256 checksum How to use checksums |
459349a42f804f0e3c4557cc9bf5da18b47f7c3b7bcaa22b542b47da0fd48294
|
| 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 18, 2026.
Transparency logSecurity for magmacrunch-nelikko 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_nelikko-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 18, 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.