Python implementation of the Tetriss game, following the challenge @ GitHub.
To start the game, simply run gui.py.
movement arrows
move the pieces left, right and downwardsa
andd
rotate the piecex
moves the piece to the bottom
It is also possible to run tetris.py from console, and control it using the following commands:
q
: quits the game@
: sets the game at the menu!
: starts/pauses the gamep
: prints the current status (menu, pause, or current grid depending on the status)P
: displays the grid with only the active pieceg
: takes as input a given gridc
: clears the grids
: steps (checks for full lines)?s
: displays score?n
: displays number of cleared linesI
: adds an 'I' tetraminoJ
: adds a 'J' tetraminoL
: adds an 'L' tetraminoO
: adds an 'O' tetraminoS
: adds an 'S' tetraminoT
: adds a 'T' tetraminoZ
: adds a 'Z' tetramino)
: rotates active tetramino clockwise(
: rotates active tetramino counter clockwise<
: moves active tetramino to the left>
: moves active tetramino to the rightv
: moves active tetramino one step downV
: moves active tetramino to the bottomt
: displayes local grid of the active tetramino;
: prints an empty line
The file tetris.py will also pass all the tests of the challenge.