Commit 07a2f342 by BellCodeEditor

save project

parent 20c39a5f
Showing with 4 additions and 4 deletions
......@@ -50,10 +50,11 @@ current_shape = random.choice(random.choice(shape_list))
def check(center):
for i in current_shape:
i = (i[0] + center[0],i[1] + center[1])
if i[0] < 1 or i[1] < 1 or cube[0] > 15 or cube[1] > 25:
return True
if i[0] < 1 or i[1] < 1 or i[0] > 25 or i[1] > 15:
return False
break
return False
return True
color = random.choice(cube_colors)
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -68,7 +69,6 @@ while True:
elif event.key == locals.K_DOWN: # 向下
if check(center):
center[0] += 1
color = random.choice(cube_colors)
# 将背景图画上去
screen.blit(background, (0, 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