Skip to content

pragyapranati/Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 OOPS project: Tetris Game in Python using OOP

This is a simple Tetris game written in Python using object-oriented programming (OOP).

📚 Libraries Used

  • pygame: For creating multimedia applications, such as games.
  • random: For generating random numbers.
  • time: For managing time.
  • art: For generating ASCII art.
  • colorama: For coloring text in the console.

🧱 Classes Used

The game is implemented using the following classes:

  • Figure: Represents a falling block.
  • Tetris: Represents the Tetris game state.

🎮 Controls

  • Left Arrow: Move left.
  • Right Arrow: Move right.
  • Down Arrow: Accelerate falling speed.
  • Up Arrow/Spacebar: Rotate clockwise.
  • Q Key: Quit the game.

🌟 Features

  • Smooth graphics using Pygame.
  • Random generation of tetrominoes.
  • Score tracking system.
  • Speed increment as the game progresses.

💡 Tips

  • Keep the board as empty as possible.
  • Clear complete lines promptly.
  • Don't panic if the board fills up.

Tetris Image Tetris Image