Commit 5bca41d9 by BellCodeEditor

save project

parent 807ac737
Showing with 4 additions and 5 deletions
...@@ -39,10 +39,8 @@ L = [[(-1, 0), (0, 0), (1, 0), (1, 1)], ...@@ -39,10 +39,8 @@ L = [[(-1, 0), (0, 0), (1, 0), (1, 1)],
[(-1, 0), (0, 0), (1, 0), (-1, -1)], [(-1, 0), (0, 0), (1, 0), (-1, -1)],
[(0, -1), (0, 0), (0, 1), (-1, 1)]] [(0, -1), (0, 0), (0, 1), (-1, 1)]]
shape_list = [I, J, L, O, S, T, Z] # 7种类型俄罗斯方块 shape_list = [I, J, L, O, S, T, Z] # 7种类型俄罗斯方块
shape = random.choice(shape_list) while True
index = random.randint(0, len(shape)-1) olor = random.choice(cube_colors)
current_shape = shape[index]
color = random.choice(cube_colors)
def check(): def check():
...@@ -84,7 +82,8 @@ while True: ...@@ -84,7 +82,8 @@ while True:
if center > grid_num_width - 1: if center > grid_num_width - 1:
index = old_index index = old_index
count = count + 1 count = count + 1
if count % if count % 30 == 0:
count = 0
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) 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