Commit c2f6f002 by BellCodeEditor

save project

parent bce2c644
Showing with 8 additions and 0 deletions
......@@ -4,14 +4,22 @@ bg=pygame.image.load('bg.png')
r=pygame.image.load('right.png')
b=pygame.image.load('body.png')
a=pygame.image.load("apple.png")
l=pygame.image.load('left.png')
d=pygame.image.load('down.png')
u=pygame.image.load('up.png')
x,y=(450,240)
FPS=pygame.time.Clock()
c=[(420,180),(450,210),(450,180),(x,y)]
s="right"
z=r
while True:
screen=pygame.display.set_mode((660,480))
for event in pygame.event.get():
if event.type==locals.QUIT:
exit()
if event.type==locals.KEYDOWN:
if event.key==locals.K_RIGHT and s!='left':
x+=30
c.append((x,y))
c.pop(0)
......
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