Commit 567fdeef by BellCodeEditor

save project

parent 19cf9948
Showing with 6 additions and 0 deletions
......@@ -67,6 +67,8 @@ while True:
if event.type == locals.QUIT:
exit()
if event.type == locals.KEYDOWN:
if gameover == True:
gameover = False
if event.key == locals.K_LEFT: # 向左
center[1] = center[1] - 1 # 左移1列
if check(center) == False:
......@@ -153,6 +155,10 @@ while True:
if gameover == True:
text = font_restart.render("游戏失败,按任意键开始",True,(0,0,0))
screen.blit(text,(20,250))
score = 0
num_list = []
for i in range(25):
num_list.append([0] * 15)
# 刷新画面
pygame.display.update()
clock.tick(FPS)
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