Commit 9818e9b1 by BellCodeEditor

save project

parent 4ebd1754
Showing with 3 additions and 3 deletions
...@@ -47,8 +47,8 @@ cube_colors = [ ...@@ -47,8 +47,8 @@ cube_colors = [
center = [2, 8] # 第2行第8列 center = [2, 8] # 第2行第8列
shape = random.choice(shape_list) shape = random.choice(shape_list)
indax = random.randint(0,len(shape)-1) index = random.randint(0,len(shape)-1)
current_shape = shape[indax] current_shape = shape[index]
color = random.choice(cube_colors) color = random.choice(cube_colors)
def check(center): def check(center):
...@@ -79,7 +79,7 @@ while True: ...@@ -79,7 +79,7 @@ while True:
old_index = index old_index = index
index +=1 index +=1
if index >= len(shape): if index >= len(shape):
index += 1 index = 0
current_shape = shape[index] current_shape = shape[index]
if check(center) == False: if check(center) == False:
index = old_index index = old_index
......
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