Skip to content

Latest commit

ย 

History

History
134 lines (95 loc) ยท 3.52 KB

File metadata and controls

134 lines (95 loc) ยท 3.52 KB

๐ŸŽฎ 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