This is my own variation of a very popular game. I wrote it in python using the pygame framework. This was my first "real" python project, and was largely done to teach myself python. Since it was a learning project, there are many things I would do differently, but I am happy with the way it turned out.
I recommend installing pyenv to enable easy installing, and toggling between, different python versions. The PyGame framework is particular about python versions. This has been tested with python 3.9.5.
To install the dependencies needed for pygame:
$ ./setup.sh
If the virtualenv is not activated yet (the setup script activates it), run:
$ source .venv/bin/activate
To run the game:
(.venv) $ python launch.py
The default key mappings are:
z
- rotate leftx
- rotate rightspace
- drop the pieceesc
- go to menu
(.venv) $ python -m unittest test/*.py