Commit 74737b32 by BellCodeEditor

save project

parent 95260cb2
Showing with 15 additions and 3 deletions
......@@ -8,8 +8,8 @@ grid_size = 20 # 格子大小
grid_num_width = 15 # 横向格子数量
grid_num_height = 25 # 纵向格子数量
FPS = 30
time=0
summon=True
# 创建窗口
screen = pygame.display.set_mode((460, 500))
pygame.display.set_caption("俄罗斯方块")
......@@ -92,7 +92,19 @@ while True:
# 将背景图画上去
screen.blit(background,(0,0))
# 得分
time+=1
if time%FPS==0:
main_pos[0]=main_pos[0]+1
if check(main_pos)==False:
main_pos[0]-=1
summon=True
if summon == True:
summon=False
main_pos=[2,8]
random_cube=random.choice(shape_list)
count=random.randint(0,len(random_cube)-1)
random_color=random.choice(cube_colors)
random_facing=random_cube[count]
for cube in random_cube[count]:
apos=(cube[0]+main_pos[0],cube[1]+main_pos[1])
......
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