PicoSnake - 3.0.0 - 320B
Ian Mallett (geometrian)
The ever-increasing (decreasing?) progression of smaller snakes.
Physically as small as I can get it without impairing usability significantly (you already can't move the mouse too much). Again, the major part of the (ever-smaller) code comes from http://www.pygame.org/project/833/?release_id=1452--but, it's been more than a year; here's reminding people of the fun of hyper-obfuscating code to make it smaller! My major contribution here is using "from pygame import*" instead of "import pygame as p". [EDIT: I see now tgfcoder suggested that a while ago, so I guess this is just a compilation of everything else!] Here's hoping someone can outdo (er, underdo) this--and do try, please!
from pygame import*;q=display;T=16;f=q.set_mode(*2).fill;l=;d=a=x=1 while not(x&528or x in l): while a&528or a in l:a=a*9%512 l=l[a!=x:]+[x];f(0);[f(99,(o%T*T,o/32*T,T,T))for o in l+[a]];q.flip();time.wait(99);D=d for e in event.get(2): v=e.key-272;n=((v&2)-1)*[1,32][v<3] if-n-D and 0
Pygame.org account Comments
If you wish to leave a comment with your pygame.org account, please sign in first.