Commit 6fd1d84e by BellCodeEditor

save project

parent a0229d96
Showing with 17 additions and 0 deletions
...@@ -117,6 +117,23 @@ while True: ...@@ -117,6 +117,23 @@ while True:
(cube[1] * 20-20, cube[0] * 20-20, 20, 20), 0) (cube[1] * 20-20, cube[0] * 20-20, 20, 20), 0)
pygame.draw.rect(screen, (255, 255, 255), pygame.draw.rect(screen, (255, 255, 255),
(cube[1] * 20-20, cube[0] * 20-20, 20, 20), 1) (cube[1] * 20-20, cube[0] * 20-20, 20, 20), 1)
new_score=0
del_list=[]
for i in range(0,25):
flag=True
row=list_nums[i].copy()
for j in range(0,15):
if row[j]==0:
flag=False
break
if flag:
new_score+=1
del_list.append(row)
for l in del_list:
list_nums.remove(l)
for i in range(new_score):
list_nums.insert(0,[0]*15)
score+=1
for i, row in zip(range(1,26),list_nums): for i, row in zip(range(1,26),list_nums):
for j,color2 in zip(range(1,16),row): for j,color2 in zip(range(1,16),row):
if color2 !=0: if color2 !=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