tetris-python
A tetris game coded in python.
The code worked with the following Python 3 and Pygame versions:
Python 3.9.0, pygame 2.0.1 (Tested in May 2021)
Python 3.7.4, pygame 1.9.6 (Tested in Sep 2019)
Python 3.6.5, pygame 1.9.3 (Tested in May 2018)
Installation Guide (Windows 10)
Install the latest versions of Python 3 and PIP, refer to:
https://phoenixnap.com/kb/how-to-install-python-3-windows
https://phoenixnap.com/kb/install-pip-windows
Install the latest version of Pygame: https://www.pygame.org/wiki/GettingStarted
Open command prompt, go to the directory of the file "tetris.py", type "py tetris.py" and the game should begin.
If it doesn't work with the latest ones, you can try installing the earlier versions:
https://www.python.org/downloads/
https://www.pygame.org/download.shtml
Game Controls
Right arrow -> Move the piece to the right
Left arrow -> Move the piece to the left
Down arrow -> Drop the piece
Up arrow -> Rotate the piece clockwise
Z -> Rotate the piece counterclockwise
R -> Restart
P -> Pause/Unpause