My version of a Tetrominoes game that I made using pygame. This project was developed as a sub-task for another project while implementing it in an Object Oriented Manner. Each line of code is accompanied by a comment to explain it better.
The files in the repository are :
The Description file containing details about the repository. The file that you looking at right now.
The __init__.py file is to make Python treat directories containing the file as packages.
This file contains the global variables that are used in the game such as SCREEN_WIDTH, SCREEN_HEIGHT,
etc.
This file is contains the game and its working. To play the game, use -
python3 main.py
This file contains the class templates for the various shapes of pieces in the game i.e. Piece class
.
This file contains the shapes of each of the game pieces as lists of lists, it also contains information about the color of each block in RGB format.
This file contains the class template for the main game-play i.e. Tetris class
.
This file contains the respective packages needed to be installed. To install the respective packages, use -
pip3 install -r requirements.txt
or
pip install -r requirements.txt
This directory contains the images for the game icon and README File.
- Reference: https://www.youtube.com/watch?v=zfvxp7PgQ6c&t=5137s by freeCodeCamp.org.
- Scoring Chart: The scoring is from the Tetris (BPS) version of this game. You can read about it here.
- Game Icon: Icons made by Freepik from flaticons.com.