Commit 5f304911 by BellCodeEditor

save project

parent a7d7ebad
Showing with 2 additions and 3 deletions
import pygame import pygame
from pygame import locals from pygame import locals
import random
# 初始化pygame,为使用硬件做准备 # 初始化pygame,为使用硬件做准备
pygame.init() pygame.init()
...@@ -51,8 +51,7 @@ while True: ...@@ -51,8 +51,7 @@ while True:
elif setheading == "up": elif setheading == "up":
y -= 30 y -= 30
else: else:
y += y += 30
import
while True: while True:
if x == apple_x and y == apple_y: if x == apple_x and y == apple_y:
apple_x = random.randint(0,660) apple_x = random.randint(0,660)
......
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