From 58072af771b268555eb51622664aae6fc7e8919b Mon Sep 17 00:00:00 2001
From: BellCodeEditor <bellcode_dev@bell.ai>
Date: Sat, 24 Jul 2021 13:50:42 -0300
Subject: [PATCH] save project

---
 snake.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/snake.py b/snake.py
index ada579e..4b9e32e 100644
--- a/snake.py
+++ b/snake.py
@@ -61,10 +61,14 @@ 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 or y > 450:
+        exit()
     # 将背景图画上去
     screen.blit(background, (0, 0))
     # 将贪吃蛇的头画上去
--
libgit2 0.25.0