Commit 48cd0e0a by BellCodeEditor

auto save

parent a074c56b
Showing with 5 additions and 2 deletions
......@@ -8,7 +8,8 @@ grid_num_width = 15 # 横向格子数量
grid_num_height = 25 # 纵向格子数量
FPS = 30
pos = [2,7]
pos_shape = [(0)]
current_pos = [(0,-1),(0,0),(0,1),(-1,0)]
# 创建窗口
screen = pygame.display.set_mode((460, 500))
pygame.display.set_caption("俄罗斯方块")
......@@ -31,7 +32,9 @@ while True:
if event.key == pygame.K_RIGHT:
if pos[1] < grid_num_width:
pos[1] += 1
for times in current_pos:
pos = (times[0] + pos[0],times[1] + pos[1])
cube.append(pos)
# 将背景图画上去
screen.blit(background,(0,0))
pygame.draw.rect(screen,(255,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