Skip to content

A simple version of popular game Tetris written in Python

License

Notifications You must be signed in to change notification settings

bruzzoneale/python-tetris

Repository files navigation

python-tetris

A simple version of popular game Tetris written in Python

Introduction

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++".

Requirements

Python-tetris is tested with Python 3.8 and Pygame 1.9.6

The Game

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

How to play

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.

About

A simple version of popular game Tetris written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages