Commit 55d9a9ab by BellCodeEditor

save project

parent 34104689
Showing with 10 additions and 2 deletions
...@@ -53,8 +53,6 @@ def cheak(center): ...@@ -53,8 +53,6 @@ def cheak(center):
cube=[cube[0]+center[0],cube[1]+center[1]] cube=[cube[0]+center[0],cube[1]+center[1]]
if cube[0]<1 or cube[1]<1 or cube[0]>grid_num_height or cube[1]>grid_num_width: if cube[0]<1 or cube[1]<1 or cube[0]>grid_num_height or cube[1]>grid_num_width:
return False return False
while True: while True:
for event in pygame.event.get(): for event in pygame.event.get():
if event.type == locals.QUIT: if event.type == locals.QUIT:
...@@ -72,6 +70,16 @@ while True: ...@@ -72,6 +70,16 @@ while True:
center[0]+=1 center[0]+=1
if cheak(center)==False: if cheak(center)==False:
center[0] -= 1 center[0] -= 1
elif event.key==locals.K_UP:
old_index=index
index+=1
if index>=len(ee):
index=0
cureet_shape=ee[index] # 向右
if cheak(center)==False:
old_index=index
cureet_shape=ee[index]
# 将背景图画上去 # 将背景图画上去
......
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