Skip to content

pragyapranati/Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f587ec2 ยท May 25, 2024

History

21 Commits
Oct 14, 2023
Sep 30, 2023
May 25, 2024
Oct 11, 2023
Dec 18, 2023

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