This is a simple implementation of the classic game Tetris in Python using the Pygame library.
In this version of Tetris, players can:
- Move pieces left and right using arrow keys
- Rotate pieces using the up arrow key
- Accelerate piece descent using the down arrow key
The game ends when the stack of Tetrominoes reaches the top of the play field.
Use the arrow keys to move and rotate the Tetrominoes. The game will end when a new Tetromino cannot be placed at the starting position.
- Python 3.x
- pip (Python package installer)
git clone https://github.com/chizkidd/tetris-game.git
cd tetris
Make sure you have Python 3.x and Pip installed. Then, install the required dependencies using the requirements.txt
file:
Install the required packages using pip:
pip install -r requirements.txt
To run the Tetris game, execute the following command in your terminal:
python tetris.py
tetris.py
: The main script to run the Tetris game.requirements.txt
: A file listing the required dependencies (Pygame).
- Left Arrow: Move piece left
- Right Arrow: Move piece right
- Up Arrow: Rotate piece
- Down Arrow: Move piece down faster
This project is open source and available under the MIT License.
Contributions, issues, and feature requests are welcome! Feel free to check issues page if you want to contribute.
Chizoba Obasi
- GitHub: @chizkidd