From 433baff87ec6f659269f14c54577cfa0133edd2a Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 7 Mar 2021 10:16:18 +0800 Subject: [PATCH] save project --- my_Tetris.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/my_Tetris.py b/my_Tetris.py index 18fa784..f9c9e6f 100644 --- a/my_Tetris.py +++ b/my_Tetris.py @@ -66,6 +66,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: @@ -122,7 +124,7 @@ while True: (cube[1] * 20-20, cube[0] * 20-20, 20, 20), 1) # for i,row in zip(range(1,26),num_list): - for j,colors in zip(range(1,16),row): + for j,colors in zip(range(1,16), row): if colors !=0: pygame.draw.rect(screen,colors, (j* 20-20, i * 20-20,20,20),0) -- libgit2 0.25.0