This is a python implementation of Tetris using the TGM ruleset.
- Package up code to be used with pip install
- Add pygame display functionality
- Compartmentalize pygame display functionality
- Add support for OpenAI Gym interface
- Complete README documentation
- Add automated testing
- Add seed for randomization
- Make tetronimos into a class
These instructions will get you a copy of the project up and running on your local machine.
Pytris requires at least Python 3.6 and these libraries:
pip install pygame
To install Pytris, clone the repository and call pip:
git clone https://github.com/mpberk/pytris_tgm.git
cd ./pytris_tgm
pip install -e .
To run Pytris, call the following:
python ./pytris_tgm/pytris_tgm_display_pygame.py
Or call the following in a python script:
from pytris_tgm import PytrisTGMDisplay
pytris = PytrisTGMDisplay()
pytris.start()
To control Pytris, use the following controls:
- Left Key
- Right Key
- Down Key
- Z - A Rotate
- X - B Rotate
- C - C Rotate
- Matt Berk - Initial work - https://github.com/mpberk
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details