Skip to content

Latest commit

 

History

History
51 lines (39 loc) · 1.83 KB

README.md

File metadata and controls

51 lines (39 loc) · 1.83 KB

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