Commit eaf46c9a by BellCodeEditor

save project

parent 4d35dece
Showing with 5 additions and 0 deletions
...@@ -19,6 +19,8 @@ x,y = 240,120 ...@@ -19,6 +19,8 @@ x,y = 240,120
sb=[(180,90),(180,120),(210,120),(x,y)] sb=[(180,90),(180,120),(210,120),(x,y)]
sth='right' sth='right'
ioit=right ioit=right
apple_x
apple_y
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -48,6 +50,9 @@ while True: ...@@ -48,6 +50,9 @@ while True:
y +=30 y +=30
sb.append((x,y)) sb.append((x,y))
if x ==apple_a and y==apple_y:
apple_x = random.randint(0,660)
apple_y = random.dandint(0,480)
sb.pop(0) sb.pop(0)
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 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