From 5990963306a203b5bd263b40f893296084d63b2e Mon Sep 17 00:00:00 2001
From: BellCodeEditor <bellcode_dev@bell.ai>
Date: Wed, 6 Oct 2021 17:43:12 +0800
Subject: [PATCH] save project

---
 snake.py | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/snake.py b/snake.py
index 3601a46..188de49 100644
--- a/snake.py
+++ b/snake.py
@@ -48,15 +48,14 @@ while True:
 
     # 设置贪吃蛇的头部坐标
     if setheading == "right":
-        x += 3
+        x += 30
     elif setheading == "left":
-        x -= 3
+        x -= 30
     elif setheading == "up":
-        y -= 3
+        y -= 30
     else:
-        y += 3
-    if x < 0 or x > 630  or y < 0 or y > 450:
-        exit()
+        y += 30
+    
     position.append((x, y))
 
     # 将背景图画上去
@@ -80,5 +79,5 @@ while True:
     text=myFont.render('score:'+str(score),True , (0,0,0))
     screen.blit(text,(540,10))
     # 刷新画面
-    pygame.display.u apdat()
-    FPSCLOCK.tick(50)
\ No newline at end of file
+    pygame.display.update()
+    FPSCLOCK.tick(3)
\ No newline at end of file
--
libgit2 0.25.0