Commit e8aca81d by BellCodeEditor

save project

parent a356b5ae
Showing with 2 additions and 2 deletions
...@@ -54,8 +54,8 @@ current_shape = [(0, -1), (0, 0), (0, 1), (-1, 0)] ...@@ -54,8 +54,8 @@ current_shape = [(0, -1), (0, 0), (0, 1), (-1, 0)]
def check(center): def check(center):
for cube in current_shape: for cube in current_shape:
if cube[0] < 1 or cube[1] < 1 or cube[0] > grid_num_height\ cube =(cube[0]+center[0],cube[1] + center[1])
or cube[1] > gird_num_width: if cube[0] < 1 or cube[1] < 1 or cube[0] > grid_num_height or cube[1] > gird_num_width:
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