Tetris is an iconic puzzle game developed by Alexey Pajitnov and released in 1984. The game starts as random coloured letter pieces (geometric shapes) starts falling from the above and can be rotated and aligned before they descend to the bottom and hence the next piece starts falling and goes on.
This game has been developed by OpenGenus Intern, Mathankumar V. This is the documentation of this project.
To run the Tetris game, you'll need the following:
-
Python: If you don't have Python installed on your computer, you can download it from the official Python website: python.org/downloads. Make sure to select the appropriate version for your operating system.
-
PyGame Library: PyGame is a library that allows you to create games and multimedia applications in Python. You can install it by running the following command in your command line or terminal:
python -m pip install pygame
To run the Tetris game, follow these steps:
- Clone the repository from GitHub by opening your command line or terminal and running the following command:
git clone https://github.com/OpenGenus/Tetris-in-Python
- Change the current directory to the cloned repository:
cd Tetris-in-Python
- Launch the game by running the Python file:
python tetris.py
Please note that these instructions assume you have Git installed on your system. If you don't have Git, you can also manually download the repository from GitHub by visiting the repository URL (github.com/OpenGenus/Tetris-in-Python) and clicking on the "Code" button, then selecting "Download ZIP". After extracting the ZIP file, navigate to the extracted directory using the command line or terminal and proceed with step 3 to run the game.