From 24d08a665a15fd8e0c14a0749d890ae7e8a3d45f Mon Sep 17 00:00:00 2001
From: BellCodeEditor <bellcode_dev@bell.ai>
Date: Sat, 13 May 2023 17:30:52 +0800
Subject: [PATCH] save project

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

diff --git a/snake.py b/snake.py
index a21ca46..dfc3605 100644
--- a/snake.py
+++ b/snake.py
@@ -59,8 +59,11 @@ while True:
         num2 = random.randint(1,16)
         apple_x = 30*num1-30
         apple_y = 30*num2-30
+        score += 10
     else:
         position.pop(0)
+    if x < 0 or x > 630 or y < 0 pr y > 450:
+        exit():
     # 将背景图画上去
     screen.blit(background, (0, 0))
     # 将贪吃蛇的头画上去
--
libgit2 0.25.0