Commit c6c7fd97 by BellCodeEditor

save project

parent 2a9013dc
Showing with 10 additions and 1 deletions
...@@ -63,7 +63,7 @@ while True: ...@@ -63,7 +63,7 @@ while True:
exit() exit()
if event.type == locals.KEYDOWN: if event.type == locals.KEYDOWN:
if event.key == locals.K_RIGHT: # 向右 if event.key == locals.K_RIGHT: # 向右
if center[1] < 14: if center[1] < 15:
center[1] += 1 center[1] += 1
if check(center) == False: if check(center) == False:
center[1] -= 1 center[1] -= 1
...@@ -78,19 +78,28 @@ while True: ...@@ -78,19 +78,28 @@ while True:
if check(center) == False: if check(center) == False:
center[0] -= 1 center[0] -= 1
elif event.key == locals.K_z: elif event.key == locals.K_z:
o_ind=ind
if ind > 0: if ind > 0:
ind-=1 ind-=1
current_shape = shape[ind] current_shape = shape[ind]
else: else:
ind=len(shape)-1 ind=len(shape)-1
current_shape = shape[ind] current_shape = shape[ind]
if check(center) == False:
ind=o_ind
current_shape = shape[ind]
elif event.key == locals.K_x: elif event.key == locals.K_x:
o_ind=ind
if ind < len(shape)-1: if ind < len(shape)-1:
ind+=1 ind+=1
current_shape = shape[ind] current_shape = shape[ind]
else: else:
ind=0 ind=0
current_shape = shape[ind] current_shape = shape[ind]
if check(center) == False:
ind=o_ind
current_shape = shape[ind]
# 将背景图画上去 # 将背景图画上去
screen.blit(background, (0, 0)) screen.blit(background, (0, 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