Commit 10f9af34 by BellCodeEditor

auto save

parent 06212097
Showing with 16 additions and 2 deletions
...@@ -94,6 +94,7 @@ while True: ...@@ -94,6 +94,7 @@ while True:
index = old_index index = old_index
current_shape = shape[index] current_shape = shape[index]
if jieshu==False: if jieshu==False:
if states == False: if states == False:
states = True states = True
center = [2, 8] # 第2行第8列 center = [2, 8] # 第2行第8列
...@@ -147,7 +148,7 @@ while True: ...@@ -147,7 +148,7 @@ while True:
row_index-=1 row_index-=1
else: else:
score+=1 score+=1
a=a2 a=a2
if a[1][7]!=0: if a[1][7]!=0:
jieshu=True jieshu=True
...@@ -155,12 +156,25 @@ while True: ...@@ -155,12 +156,25 @@ while True:
text_surface = font.render(str(score), True, (0, 0, 0)) text_surface = font.render(str(score), True, (0, 0, 0))
screen.blit(text_surface, (350,70)) screen.blit(text_surface, (350,70))
if jieshu==True: if jieshu==True:
text_surface = frot2.render('游戏结束,按任意键开始', True, (0, 0, 0)) text_surface = frot2.render('游戏失败,按任意键开始', True, (0, 0, 0))
screen.blit(text_surface, (20,200)) screen.blit(text_surface, (20,200))
score=0 score=0
if score==1:
text = frot2.render('游戏胜利,按任意键开始', True, (0, 0, 0))
screen.blit(text, (20,200))
score=0
a=[] a=[]
for i in range(25): for i in range(25):
a.append([0]*15) a.append([0]*15)
# 刷新画面 # 刷新画面
pygame.display.update() pygame.display.update()
clock.tick(FPS) 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