Tetris in 73 Lines - 1
Tetris written in 73 lines. Left, right, up rotates, down pushes down, space drops. Game over to quit. :P And yes, the code is obfuscated on purpose. :P Enjoy decoding it =)
Jordan Trudgett
(tgfcoder)
removed comments, extra space (indentation spacing and also
"x = 5", "6, 7, 8, 9" spaces for example) and put anything possible onto one line, separated by semi-colons.
The code itself is 2.6K and is 73 lines (probably can still be shortened.)
See if you can work out what each part does! (The list
manipulations would be the trickiest, I think.)
I was inspired by a similar tetris game written in 256
bytes... it probably does less than mine, but I thought it
was still damn impressive. :P
For a less sadistic approach to Python, see my
masterpiece-in-progess, Ardentryst.
http://www.pygame.org/project/596/
Controls
- Left: move block left
- Right: move block right
- Up: rotate block
- Down: push block down space drops. Game over to quit. :P
Changes
Links
- Home Page
- http://jordantrudgett.com/
- Source
- http://jordantrudgett.com/stuff/tetris_73.zip
Releases
Tetris in 73 Lines 1.00 — 30 Jun, 2008
Tetris in 73 Lines 1 — 10 Mar, 2013
Pygame.org account Comments
-
Mak D'Uniq 2012-04-22 11:53
where can i download it? source link is not working
-
codequickly 2012-04-23 03:15
Yep, source code link is not working.
-
Soccermanhorse 2012-04-29 15:18
The source link needs to get fixed !
-
tgfcoder 2013-03-10 06:36
Source URI has been updated. Thanks isacliaen7 for pointing this out to me personally :)
-
Nonya Binnis 2014-04-24 23:10
Of course it's on 73 lines if you scrunch a bunch of statements on to one line like that... You might as well write the whole thing on one line and say it's Tetris in one line of code.
-
Noname 2015-05-24 21:44
Is there any documentation for your code, I really can't understand anything :D
-
Robert Moore 2015-07-24 17:26
It freezes my computer until I finish the game!
-
18thcaliber 2015-10-02 08:43
yeah i can't use it