A simple version of popular game Tetris written in Python
This project was born for educational purpose. It will introduce a novice Python developer to some basic concept of OOP.
This version of the game was inspired by FamTrilli video "Let's make 16 games in C++".
Python-tetris is tested with Python 3.8 and Pygame 1.9.6
In this version of Tetris you can customize graphics, sounds and levels.
Note: the game is in English but code comments are written in Italian language
Here a summary of the modules:
-
commons.py
A collection of general-purpose functions and global variables
-
tetris_config.py
It contains global parameters to customize grqaphics and sounds
-
tetris_levels.py
It defines classes to implement different game levels of difficulty
-
tetris_game_elements.py
It defines classes to implement the tetramine and game board logic
-
tetris.py
It defines the main classes of the game
Press ENTER
to start a new game.
Press LEFT
and RIGHT
arrow keys to move the tetramine.
Press SPACE BAR
to rotate the tetramine.
Press DOWN
arrow key to accelerate the fall of the tetramine.