Commit 1aa885a6 by BellCodeEditor

auto save

parent 837a3091
Showing with 4 additions and 4 deletions
...@@ -5,7 +5,7 @@ import random ...@@ -5,7 +5,7 @@ import random
pygame.init() pygame.init()
# 创建一个窗口 # 创建一个窗口
screen = pygame.display.set_mode((660, 480)) screen = pygame.display.set_mode((6600, 4800))
FPSCLOCK = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数) FPSCLOCK = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 背景 # 背景
...@@ -63,7 +63,7 @@ while True: ...@@ -63,7 +63,7 @@ while True:
score+=10 score+=10
else: else:
position.pop(0) position.pop(0)
if x<0 or x>630 or y<0 or y>450: if x<0 or x>6300 or y<0 or y>4500:
exit() exit()
# 将背景图画上去 # 将背景图画上去
...@@ -81,4 +81,4 @@ while True: ...@@ -81,4 +81,4 @@ while True:
screen.blit(food, (app_x, app_y)) screen.blit(food, (app_x, app_y))
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
FPSCLOCK.tick(5) FPSCLOCK.tick(10)
\ No newline at end of file \ No newline at end of file
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