Commit 783800a2 by BellCodeEditor

save project

parent 820b8763
Showing with 10 additions and 4 deletions
......@@ -29,8 +29,14 @@ while True:
shi="up"
if event.key==locals.K_DOWN and shi != "up":
shi="down"
x+=30
if shi=="right":
x+=30
elif shi=="left":
x-=30
elif shi=="up":
y-=30
else:
y+=30
pst.append((x,y))
pst.pop(0)
# 将背景图画上去
......@@ -45,4 +51,4 @@ while True:
screen.blit(food, (360, 300))
# 刷新画面
pygame.display.update()
FPS.tick(3)
\ No newline at end of file
FPS.tick(6)
\ 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