Skip to content

Roosso/Tetris-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Tetris - Classic Tetris Game

Python Pygame License Platform

🧩 Classic Tetris game implemented in Python using Pygame. Dive into the world of falling blocks and strategic thinking!

✨ Features

  • 🎯 Large game field: 25×50 cells for long gaming sessions
  • 🧩 7 types of tetrominoes: All classic shapes (I, O, T, S, Z, J, L)
  • 📈 Progressive difficulty: Level increases every 10 cleared lines
  • 💯 Smart scoring system: Bonuses for clearing multiple lines at once
  • 👀 Preview: Shows the next shape for strategic planning
  • 🎨 Colored blocks: Each shape has a unique color
  • Smooth animation: 60 FPS for comfortable gameplay

🎮 Controls

Key Action
Move shape left/right
Accelerated shape fall
Rotate shape clockwise
Space Instant shape fall to bottom
R Restart game

🏆 Scoring System

Lines cleared Points
1 line 100 × level
2 lines 300 × level
3 lines 500 × level
4 lines (Tetris!) 800 × level

💡 Tip: Try to clear 4 lines at once for the maximum number of points!

🚀 Quick Start

Installation dependencies

# Install all required dependencies
pip install -r requirements.txt

Or install Pygame manually:

pip install pygame>=2.0.0

Run game

# Clone repository
git clone https://github.com/Roosso/Tetris-Game.git
cd tetris

# Run game
python tetris.py

📋 Requirements

  • 🐍 Python: 3.6 or higher
  • 🎮 Pygame: 2.0 or higher
  • 💾 RAM: minimum 64 MB
  • 🖥️ Screen resolution: minimum 800×600

⚙️ Technical details

Parameter Value
Cell size 20 pixels
Game field size 25×50 cells
Window size 450×600 pixels
Frame rate 60 FPS
Initial speed 30 frames per block

🎯 Gameplay

  1. Goal: Fill horizontal lines with blocks to make them disappear
  2. Shapes: Control falling tetrominoes of different shapes
  3. Levels: With each level, the speed of falling increases
  4. End of game: The game ends when blocks reach the top of the screen

🏗️ Architecture

tetris.py
├── Tetris class
│   ├── Game initialization
│   ├── Shape control
│   ├── Game field logic
│   ├── Scoring system
│   └── Interface drawing
└── Main game loop

🤝 Contribution to the project

We welcome contributions to the project! If you have ideas for improvement:

  1. 🍴 Fork the repository
  2. 🌿 Create a branch for a new feature (git checkout -b feature/AmazingFeature)
  3. 💾 Commit changes (git commit -m 'Add some AmazingFeature')
  4. 📤 Push to the branch (git push origin feature/AmazingFeature)
  5. 🔄 Open a Pull Request

📝 License

This project is distributed under the MIT license. See the LICENSE file for details.

🎉 Thanks

  • 🙏 Thank you to Alexey Pazytnov for creating the original Tetris
  • 🐍 Thank you to the Python team for the excellent programming language
  • 🎮 Thank you to the Pygame developers for the powerful library for games

Enjoy the game! 🎮✨

Made with ❤️ for lovers of classic puzzles

About

Small Tetris Game

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages