Commit 018903e6 by BellCodeEditor

save project

parent 064c7eed
Showing with 14 additions and 12 deletions
......@@ -62,13 +62,8 @@ def comon(center):
return False
states=True
while True:
if states==False:
current_shape1=random.choice(shape_list)
index=random.randint(0,len(current_shape1)-1)
current_shape=current_shape1[index]
color=random.choice(cube_colors)
states=True
comon(center)
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -103,15 +98,22 @@ while True:
if comon(center)==False:
index=old_index
current_shape=current_shape1[index]
if states==False:
center = [2, 8]
states=True
current_shape1=random.choice(shape_list)
index=random.randint(0,len(current_shape1)-1)
current_shape=current_shape1[index]
color=random.choice(cube_colors)
count+=1
if count%FPS==0:
if center[0] < 25:
center[0] += 1
if comon(center)==False:
center[0]= center[0]+1
if comon(center)==False:
center[0]-=1
if center[0]>=grid_num_height:
states=False
states=False
......
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