Commit 350be7db by BellCodeEditor

save project

parent be0d05f8
Showing with 3 additions and 3 deletions
......@@ -18,7 +18,7 @@ clock = pygame.time.Clock() # pygame时钟,控制游戏速度(帧数)
# 载入素材
background = pygame.image.load('bg.png')
font = pygame.font.Font('STKAITI.TTF', 60) # 字体
font_restart = pygame.font.Font('STKAITI.TTF',15)
font_restart = pygame.font.Font('STKAITI.TTF',22)
# 俄罗斯方块所有形状
O = [[(0, 0), (0, 1), (1, 0), (1, 1)]]
I = [[(0, -1), (0, 0), (0, 1), (0, 2)],
......@@ -64,7 +64,7 @@ while True:
exit()
if event.type == locals.KEYDOWN:
if gameover==True:
gameover==False
gameover=False
if event.key == locals.K_LEFT: # 向左
center[1] = center[1] - 1 # 左移1列
if check(center) == False:
......@@ -147,7 +147,7 @@ while True:
text_surface = font.render(str(score), True, (0, 0, 0))
screen.blit(text_surface, (350,70))
if gameover==True:
text_surface2 = font.render("游戏失败,按任意键重新开始", True, (0, 0, 0))
text_surface2 = font_restart.render("游戏失败,按任意键重新开始", True, (0, 0, 0))
screen.blit(text_surface2, (20,250))
score=0
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