Python - Tetris in 28 or 50 lines of code.

Fully functional classic Tetris game written in Python 2.6.5 for Linux, text mode (curses module), only standard libraries.
The code is highly optimized for size, not for performance or speed, it looks ogly and you shouldn't write your programs like that, it's only the proof of concept.

Normal version: 50 lines
Squeezed code: 28 lines

Download: tetris2850l.tar.bz2




If you have an idea how to make it even more shorter, please let me know by posting comments here.

4 comments:

Fran├žois Dillinger said...

How exactly rotation works?

sp said...
This comment has been removed by the author.
sp said...

code updated 2016 by sp

http://pastebin.com/RrTTLKJ6

sp said...
This comment has been removed by the author.

Post a Comment