From 98f17b2b004a660faed2c9f7b466771e924f5274 Mon Sep 17 00:00:00 2001
From: BellCodeEditor <bellcode_dev@bell.ai>
Date: Sat, 11 Dec 2021 11:10:19 +0800
Subject: [PATCH] save project

---
 snake.py |  9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/snake.py b/snake.py
index dfefcfa..54c2582 100644
--- a/snake.py
+++ b/snake.py
@@ -56,12 +56,9 @@ while True:
         y += 30
     position.append((x, y))
     if x == apple_x and y == apple_y:
-        zhuzhu = random.randint(1,22)
-        xia = random.randint(1,16)
-        apple_x = zhuzhu*30-30
-        apple_y = xia*30-30
-    else:
-        position.pop(0)
+        apple_x = random.randint(0,660)
+        apple_y = random.randint(0,480)
+    position.pop(0)
     # 将背景图画上去
     screen.blit(background, (0, 0))
     # 将贪吃蛇的头画上去
--
libgit2 0.25.0