Commit 3f15479c by BellCodeEditor

save project

parent 3e742ac9
Showing with 2 additions and 2 deletions
...@@ -52,8 +52,8 @@ color=random.choice(cube_colors) ...@@ -52,8 +52,8 @@ color=random.choice(cube_colors)
direction=random.choice(shape) direction=random.choice(shape)
def check(center1): def check(center1):
for i in direction: for i in direction:
pos_check=[i[0]+center1[0],i[1]+center1[1]] pos_check=[center1[0]+i[0],center1[1]+i[1]]
if pos_check[0]>grid_num_height or pos_check[1]<0 or pos_check[1]>grid_num_width: if pos_check[0]==grid_num_height+1 or pos_check[1]==0 or pos_check[1]==grid_num_width+1:
return False return False
while True: while True:
......
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