Commit d6d7c123 by BellCodeEditor

save project

parent 39b69487
Showing with 3 additions and 1 deletions
......@@ -21,7 +21,6 @@ x,y = 240,120
position = [(180,90)(180,120)(210,120)(x,y)]
setheading = 'right'
snake_head = right
score = 0
while True:
for event in pygame.event.get():
......@@ -56,9 +55,12 @@ if x == apple_x and y == apple_y:
num2 = random.randint(1,16)
apple_x = num1*30-30
apple_y = num2*30-30
score += 10
else:
position.pop(0)
if x<0 or x>630 or y<0 or y>0:
exit()
x += 30
position.appent((x,y))
position.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