Commit 6fe23a5c by BellCodeEditor

save project

parent 1b46dd4a
Showing with 10 additions and 3 deletions
......@@ -12,7 +12,7 @@ background = pygame.image.load('bg.png')
right = pygame.image.load('right.png')
food = pygame.image.load('apple.png')
body = pygame.image.load('body.png')
my_font = pygame.font.Font('neuropol.ttf', 18)
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -40,4 +40,11 @@ while True:
y-=30
else:
y+=30
\ No newline at end of file
position.append((x,y))
if x==apper_x and y==apple_y:
num=random.randiut(1,22)
num=random.randiut(1,16)
apper_x= num*30-30
apper_y= num*30-30
else:
position.pop(0)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment