|
pygame is
pygame.org is
|
PicoSnake
PicoSnake - 2.0.0Ian Mallett (geometrian)Tags:DescriptionThe ever-increasing (decreasing?) progression of smaller snakes. ChangesMost of the code plagiarized directly from http://www.pygame.org/project/833/?release_id=1452
Minor changes made it smaller.
import pygame as p,random
p.init()
q=p.display
T=16
s=q.set_mode([256]*2)
l=[0]
d=1
a=2
def j(o):s.fill(99,(o%T*T,o/32*T,T,T))
while 1:
for e in p.event.get(2):
v=e.key-272
if 0
n=((v&2)-1)*[1,32][v<3]
if-n-d:d=n
s.fill(0)
x=l[-1]+d
if x&528or x in l:o
l+=[x]
if a-x:l=l[1:]
if a&528or a in l:a=random.randrange(512)
map(j,l+[a])
q.flip()
p.time.wait(99)
LinksScreenshot click to view original size
Releases
Pygame.org account CommentsIf you wish to leave a comment with your pygame.org account, please sign in first.
|
| spotlight |
|
|
|
| our projects |
|
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
|
|
|
| recent releases |
|
Jun 11, 2013
Jun 9, 2013
Jun 7, 2013
Jun 4, 2013
Jun 1, 2013
May 30, 2013
May 26, 2013
May 24, 2013
May 23, 2013
May 22, 2013
May 21, 2013
... more!
|
|