Skip to content
/ Tetris Public

๐Ÿ•น๏ธ Play classic Tetris! Python-powered with Pygame. Rotate, move, and clear lines! Clone, run 'main.py' to enjoy. Customize shapes, settings. Happy gaming! ๐ŸŽฎ๐Ÿ”ด

License

Notifications You must be signed in to change notification settings

EMMMABK/Tetris

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

44 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

tetris

Tetris Game ๐Ÿ•น๏ธ

This is a classic Tetris game implemented in Python using the Pygame library. The game offers a traditional Tetris experience with falling tetrominoes that you can control to complete lines and score points.

Getting Started ๐Ÿš€

Prerequisites

  • Python 3.x
  • Pygame library

Installation ๐Ÿ› ๏ธ

  1. Clone the repository:

    git clone https://github.com/your-username/tetris-game.git
  2. Install the required dependencies:

    pip install pygame

Running the Game โ–ถ๏ธ

Navigate to the project directory and run the following command:

python main.py

Gameplay ๐ŸŽฎ

  • Controls:

    • Use the left and right arrow keys to move the falling tetromino sideways.
    • Press the up arrow key to rotate the tetromino clockwise.
    • Use the down arrow key to speed up the falling of tetrominoes.
    • Press ESC to exit the game.
  • Aim:

    • Fill complete lines horizontally to make them disappear and earn points.
    • Avoid reaching the top of the screen; the game ends if the tetrominoes stack up to the top.

Code Structure ๐Ÿงฑ

The project contains the following main files:

  • main.py: Contains the game's main logic and setup.
  • settings.py: Includes various game settings and configurations.
  • tetris.py: Manages the Tetris game mechanics and rendering.
  • tetromino.py: Defines the tetromino blocks and their behavior.

Customization ๐ŸŽจ

  • Changing Tetromino Shapes:
    • Modify the TETROMINOES dictionary in settings.py to create different shapes for tetrominoes.
  • Adjusting Game Settings:
    • Explore settings.py to tweak game-related constants, such as speed, colors, and screen dimensions.

Acknowledgments ๐Ÿ™Œ

Special thanks to the Pygame community and the creators of Tetris for the inspiration.

Happy gaming! ๐ŸŒŸ

About

๐Ÿ•น๏ธ Play classic Tetris! Python-powered with Pygame. Rotate, move, and clear lines! Clone, run 'main.py' to enjoy. Customize shapes, settings. Happy gaming! ๐ŸŽฎ๐Ÿ”ด

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages