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
- Documentation
- PyPI
- Support: create an issue or see author contact
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