Commit 95260cb2 by BellCodeEditor

save project

parent 49447391
Showing with 14 additions and 4 deletions
......@@ -75,16 +75,26 @@ while True:
main_pos[1]-=1
if event.key==locals.K_DOWN:
if main_pos[0]<25:
main_pos[0]=main_pos[0]+1
main_pos[0]=main_pos[0]+1
if check(main_pos)==False:
main_pos[0]-=1
if event.key==locals.K_UP:
old_count=count
count+=1
if count>=len(random_cube):
count=0
random_facing=random_cube[count]
if check(main_pos)==False:
count=old_count
random_facing=random_cube[count]
pos=[]
# 将背景图画上去
screen.blit(background,(0,0))
# 得分
for cube in random_facing:
for cube in random_cube[count]:
apos=(cube[0]+main_pos[0],cube[1]+main_pos[1])
pos.append(apos)
for cube in pos:
......
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