A simple implementation of the classic Tetris game using Python and Tkinter.
This project is a basic implementation of the classic game Tetris using Python and the Tkinter library for the graphical interface. Tetris is a tile-matching puzzle video game originally designed and programmed by Alexey Pajitnov in the Soviet Union.
- Classic Tetris gameplay.
- Simple and intuitive controls.
- Score tracking.
- Game over screen.
- Restart functionality.
- Run the game by executing the
playTetris()
function in the Python script. - Use the arrow keys to move the falling Tetris pieces.
- Press the "Up" arrow key to rotate the pieces.
- Try to complete horizontal lines with the Tetris pieces to clear them and score points.
- The game ends when the pieces stack up to the top of the screen.
To run the Tetris game on your local machine, follow these steps:
-
Clone the repository to your computer.
git clone https://github.com/your-username/tetris-game.git
-
Navigate to the project directory.
cd tetris-game
-
Run the game.
python tetris.py
- Use the "Left" and "Right" arrow keys to move the falling piece horizontally.
- Use the "Down" arrow key to move the piece down faster.
- Press the "Up" arrow key to rotate the falling piece.
- Press the "R" key to restart the game.
This project is licensed under the MIT License - see the LICENSE file for details.
Enjoy playing Tetris!