Commit 433baff8 by BellCodeEditor

save project

parent a9265925
Showing with 3 additions and 1 deletions
......@@ -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)
......
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