This repository contains a simple implementation of the classic Tetris game using Python and Pygame. The game includes various Tetris blocks, levels, and a scoring system. Feel free to use and modify this code for learning purposes or as a starting point for your own game projects.
-
Make sure you have Python installed on your machine. You can download it from python.org.
-
Clone the repository to your local machine:
git clone https://github.com/your-username/tetris-game.git
-
Navigate to the project directory:
cd tetris-game
-
Install the required dependencies:
pip install -r requirements.txt
Run the Tetris game by executing the following command:
python tetris.py
- Left Arrow: Move block left
- Right Arrow: Move block right
- Down Arrow: Move block down (faster)
- Up Arrow: Rotate block
- P: Pause/unpause the game
- Classic Tetris gameplay with different block shapes.
- Levels and scoring system.
- Pause functionality.
- Game over screen.
Contributions are welcome! If you find any issues or have ideas for improvements, feel free to open an issue or submit a pull request.