I implemented the classic Tetris game. It requires Python 2 and the
Once you have downloaded the
It is possible for you to modify many aspects of the game, as the source code is included in the
- The easiest task is changing the colorscheme of the game: simply edit
gameproperties.pyin the appropriate places. Note that only hexadecimal color codes are admissible. Also note that the background for the game is saved as Grid.PNG. If you change the background color in gameproperties.py, then you'll need to run makecanvas.pyonce to generate an updated Grid.PNG. You can do that with the command python makecanvas.py.
- The game is built such that the level you are on determines how quickly blocks fall, and you advance a level for every ten lines you clear, so the difficulty increases very gradually. If you'd prefer constant difficulty, you can just change line 353 of
tetris.py: set timeintervalto a constant, e.g. timeinterval = 0.5.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.