Skip to main content

Simple and modular tetris library

Project description

python-tetris: a simple and modular tetris library

pypi python-versions downloads build docs technical-debt


Intro

A simple and modular library for implementing and analysing Tetris games, guideline-compliant by default

>>> import tetris
>>> game = tetris.BaseGame(board_size=(4, 4), seed=128)
>>> game.queue
<SevenBag object [J, O, L, I, T, S, J, ...]>
>>> for _ in range(4): game.hard_drop()
...
>>> game.playing
False
>>> print(game)
J O O
J J J
Z Z
  Z Z

Links

Install

This package is available on PyPI, you can install it with pip:

pip install tetris
# or `py -m pip ...` etc.

To install the git version:

pip install git+https://github.com/g3ner1c/python-tetris

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

tetris-1.0.0a0.tar.gz (31.9 kB view details)

Uploaded Source

Built Distribution

tetris-1.0.0a0-py3-none-any.whl (36.4 kB view details)

Uploaded Python 3

File details

Details for the file tetris-1.0.0a0.tar.gz.

File metadata

  • Download URL: tetris-1.0.0a0.tar.gz
  • Upload date:
  • Size: 31.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1040-azure

File hashes

Hashes for tetris-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 719992c8be8c90b7eaded5a9b54298d678d341d288cb7fb06079706dce0b4248
MD5 8edab73350d4e43de150271814d13b5f
BLAKE2b-256 0add5b3a4db0214080e1f41151dc7ce1c4b82400c3dda72e08948dc574dd3afd

See more details on using hashes here.

File details

Details for the file tetris-1.0.0a0-py3-none-any.whl.

File metadata

  • Download URL: tetris-1.0.0a0-py3-none-any.whl
  • Upload date:
  • Size: 36.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.12 Linux/5.15.0-1040-azure

File hashes

Hashes for tetris-1.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0f15a2dafee57160f91e6b86f368e1b74ec32198516daea8c7c9238db5c88f9
MD5 8f71242f0739710667d3023c90bd1e56
BLAKE2b-256 43e83ce8b6ed4da7698e248d75d76db7861986b5d3f98b7f387ce359936938b0

See more details on using hashes here.

Supported by

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