Commit a5cd007e by BellCodeEditor

save project

parent 0f24620f
Showing with 5 additions and 5 deletions
...@@ -63,8 +63,8 @@ while True: ...@@ -63,8 +63,8 @@ while True:
if event.type == locals.QUIT: if event.type == locals.QUIT:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if gameover==Ture: if gameover==True:
gameover==False gameover=False
if event.key == locals.K_LEFT: # 向左 if event.key == locals.K_LEFT: # 向左
center[1] = center[1] - 1 # 左移1列 center[1] = center[1] - 1 # 左移1列
if check(center) == False: if check(center) == False:
...@@ -140,11 +140,11 @@ while True: ...@@ -140,11 +140,11 @@ while True:
score += 1 score += 1
num_list = new_list num_list = new_list
if num_list[1][7] !=0: if num_list[1][7] !=0:
gameover=Ture gameover=True
text_surface = font.render(str(score), True, (0, 0, 0)) text_surface = font.render(str(score), True, (0, 0, 0))
screen.blit(text_surface, (350,70)) screen.blit(text_surface, (350,70))
if gameover == Ture: if gameover == True:
text = font_restart.render("游戏失败,按任意键开始",Ture,(0,0,0)) text = font_restart.render("游戏失败,按任意键开始",True,(0,0,0))
screen.blit(text,(20,250)) screen.blit(text,(20,250))
score=0 score=0
num_list = [] num_list = []
......
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