if lives <1:
text_surf = init_font(FONTPATH,32,"YOU LOSE!",GREEN,BLUE)
draw_font(text_surf,DISPLAYSURF,WINDOWWIDTH/2-text_surf.get_rect().width/2,WINDOWHEIGHT/2-text_surf.get_rect().height/2)
fontObj = pygame.font.Font(FONTPATH1, 32)
draw_bar(BAR,lives)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
#shuffle_boxs_color(boxs)
if is_won(boxs):
text_surf = init_font(FONTPATH,32,"YOU WON!",GREEN,BLUE)
draw_font(text_surf,DISPLAYSURF,WINDOWWIDTH/2-text_surf.get_rect().width/2,WINDOWHEIGHT/2-text_surf.get_rect().height/2)
draw_bar(BAR,lives)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
shuffle_boxs(boxs,20)
pygame.display.update()
FPSCLOCK.tick(FPS)
if __name__ == '__main__':
main()
text_surf = init_font(FONTPATH,32,"YOU LOSE!",GREEN,BLUE)
draw_font(text_surf,DISPLAYSURF,WINDOWWIDTH/2-text_surf.get_rect().width/2,WINDOWHEIGHT/2-text_surf.get_rect().height/2)
fontObj = pygame.font.Font(FONTPATH1, 32)
draw_bar(BAR,lives)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
#shuffle_boxs_color(boxs)
if is_won(boxs):
text_surf = init_font(FONTPATH,32,"YOU WON!",GREEN,BLUE)
draw_font(text_surf,DISPLAYSURF,WINDOWWIDTH/2-text_surf.get_rect().width/2,WINDOWHEIGHT/2-text_surf.get_rect().height/2)
draw_bar(BAR,lives)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
shuffle_boxs(boxs,20)
pygame.display.update()
FPSCLOCK.tick(FPS)
if __name__ == '__main__':
main()