Skip to content

Commit

Permalink
Making a new snake version, the smallest it can be!
Browse files Browse the repository at this point in the history
The smallest snake there is!
  • Loading branch information
Harry committed Feb 17, 2019
1 parent 465e790 commit f8ab9bf
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions snakemicro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import pygame as py
import random as rn
py.init()
class gm:
clk=py.time.Clock()
scr=py.display.set_mode((512,512))
run=True
class sn:
x = rn.randint(0,32)
y = rn.randint(0,32)
def rec(s,x,y,w,h,c):
py.draw.rect(s,c,py.Rect(x,y,w,h))
def draw():
gm.rec(gm.scr,gm.sn.x*16,gm.sn.y*16,32,32,(255,0,0))
while gm.run:
gm.draw()
py.display.flip()

0 comments on commit f8ab9bf

Please sign in to comment.