Skip to main content

PicoSnake - 2.0.0

The ever-increasing (decreasing?) progression of smaller snakes.


Ian Mallett
(geometrian)
The ever-increasing (decreasing?) progression of smaller snakes.

Changes

Most 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)

Links

Home Page
http://www.pygame.org/

Releases

PicoSnake 2.0.0 — 1 Aug, 2008

PicoSnake 1.0.0 - 390B — 30 Jul, 2008

PicoSnake 3.0.0 - 320B — 30 Aug, 2009

PicoSnake 4.0.0 - 304B — 15 Feb, 2010

Pygame.org account Comments