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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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