Skip to main content

A Tetris game for your terminal, built with the Textual framework.

Project description

textual-tetris

textual-tetris is a minimalist Tetris clone written with Textual, an amazing TUI framework for Python. It focuses on compact components, colorized blocks, and a responsive keyboard feel in the terminal.

Running

The easiest way is using uvx (part of uv):

uvx textual-tetris

Blog post: https://mgaitan.github.io/en/posts/textual-tetris/

The mandatory screenshot

Gameplay

  • Blocks follow the classic rules: move left/right, rotate, soft drop, and hard drop.
  • Every locked piece awards a small bonus; clearing 1–4 lines follows the traditional scoring table. Levels increase automatically based on the number of cleared lines, and the drop interval accelerates per level.
  • The Next widget previews the upcoming piece so you can plan ahead, and the score widget keeps score/level/lines visible at all times.

Controls

Key Action
← / A Move left
→ / D Move right
↓ / S Soft drop
↑ / W Rotate
Space Hard drop
Ctrl+Q Quit
R Restart after a game-over

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

textual_tetris-0.3.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

textual_tetris-0.3.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file textual_tetris-0.3.1.tar.gz.

File metadata

  • Download URL: textual_tetris-0.3.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for textual_tetris-0.3.1.tar.gz
Algorithm Hash digest
SHA256 b55ddb024bab7fa41e015ceb9bd3dba1d4c13e9f9ca48d462371571eda31d153
MD5 3f22764e9bc183f7c3728c577d21d9f7
BLAKE2b-256 4ab08af6dc1032d9c5fdb9a04be01374865b173d286fda5931a75109bd5c4e7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for textual_tetris-0.3.1.tar.gz:

Publisher: cd.yml on mgaitan/textual-tetris

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file textual_tetris-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: textual_tetris-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for textual_tetris-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f615979386ac875ddad189e14bfcb0fa6306e8b66ef77384b974ae4be9255eb6
MD5 d2459553afaeafb72a68e79a9bc6f740
BLAKE2b-256 a596b63e619504db8d0bb3b273628aacc14272d5a8548260958128e00e43678e

See more details on using hashes here.

Provenance

The following attestation bundles were made for textual_tetris-0.3.1-py3-none-any.whl:

Publisher: cd.yml on mgaitan/textual-tetris

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page