Tetris
• 163 words • 0'48
A Tetris game built in class with the Python programming language.
A Tetris game built in class with the Python programming language and the Tkinter graphics library.

Features
- A board of 20 rows by 14 columns, topped by a grey zone: the game is lost as soon as a piece gets stuck in it.
- 9 different shapes, including two 5-square shapes (a cross and a "U") on top of the classic pieces.
- A preview of the next piece and a score that goes up with each completed line.
- Buttons to start, pause, restart a game and quit.
Controls
- ← / →: move the piece
- ↑: rotate the piece
- ↓: speed up the fall
Code structure
The game follows a Model-View-Controller architecture split across three files:
modele.py (the board, shapes, collisions and score), vue.py (the Tkinter display) and
pytetris.py (the controller, which handles key presses and the game loop).