Commit 42f1723b by BellCodeEditor

save project

parent 41af58d4
Showing with 5 additions and 3 deletions
import pygame
import random
from pygame import locals
pygame.init()
screen = pygame.display.set_mode((660, 480))
......@@ -13,6 +14,7 @@ body = pygame.image.load('body.png')
zx='right'
cx=right
x,y=240,120
x1,y1=360,300
lb=[(180,90),(180,120),(210,120),(x,y)]
while True:
for event in pygame.event.get():
......@@ -41,10 +43,11 @@ while True:
y+=30
lb.append((x,y))
lb.pop(0)
screen.blit(background, (0, 0))
screen.blit(cx, (x, y))
for i in range(len(lb)-1):
screen.blit(body,lb[i])
screen.blit(food, (360, 300))
screen.blit(food, (x1, y1))
pygame.display.update()
e.tick(3)
\ No newline at end of file
import random
import random
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