Commit a364f7a1 by BellCodeEditor

auto save

parent ee147876
Showing with 11 additions and 1 deletions
......@@ -59,6 +59,9 @@ def check(center):
num_list=[]
for i in range(25):
num_list.append([0]*15)
row_index = 24
for i in range(24,-1,-1):
while True:
for event in pygame.event.get():
if event.type == locals.QUIT:
......@@ -88,7 +91,7 @@ while True:
if check(center) == False:
index = old_index
current_shape = shape[index]
if gameover==False:
if states == False:
states = True
center = [2, 8] # 第2行第8列
......@@ -123,6 +126,13 @@ while True:
# 得分
text_surface = font.render(str(score), True, (0, 0, 0))
screen.blit(text_surface, (350,70))
if gameover== True:
text=font_restart.render("游戏失败,按任意键开始",True,(0,0,0))
screen.blit(text,(20,250))
score=0
num_list=[]
for i in range(25):
num_list.append([0]*15)
# 刷新画面
pygame.display.update()
clock.tick(FPS)
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