Skip to content

simple and modular tetris library, originally by Sofia "dzshn" Lima

License

Notifications You must be signed in to change notification settings

skysomorphic/python-tetris

Repository files navigation

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

About

simple and modular tetris library, originally by Sofia "dzshn" Lima

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages