else:
anim_cover(boxs,first_select,boxx,boxy)
first_select.is_revealed = False
print first_select.boxx,first_select.boxy,first_select.is_revealed
print boxs[first_select.boxx][first_select.boxy].is_revealed
boxs[boxx][boxy].is_revealed = False
first_select = None
if lives <1:
fontObj = pygame.font.Font('freesansbold.ttf', 32)
textSurfaceObj = fontObj.render('YOU LOSE!', True, GREEN, BLUE)
textRectObj = textSurfaceObj.get_rect()
textRectObj.center = (WINDOWWIDTH/2, WINDOWHEIGHT/2)
DISPLAYSURF.blit(textSurfaceObj, textRectObj)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
if is_won(boxs):
fontObj = pygame.font.Font('freesansbold.ttf', 32)
textSurfaceObj = fontObj.render('YOU WON!', True, GREEN, BLUE)
textRectObj = textSurfaceObj.get_rect()
textRectObj.center = (WINDOWWIDTH/2, WINDOWHEIGHT/2)
DISPLAYSURF.blit(textSurfaceObj, textRectObj)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
#pygame.time.wait(500)
pygame.display.update()
FPSCLOCK.tick(FPS)
if __name__ == '__main__':
main()
anim_cover(boxs,first_select,boxx,boxy)
first_select.is_revealed = False
print first_select.boxx,first_select.boxy,first_select.is_revealed
print boxs[first_select.boxx][first_select.boxy].is_revealed
boxs[boxx][boxy].is_revealed = False
first_select = None
if lives <1:
fontObj = pygame.font.Font('freesansbold.ttf', 32)
textSurfaceObj = fontObj.render('YOU LOSE!', True, GREEN, BLUE)
textRectObj = textSurfaceObj.get_rect()
textRectObj.center = (WINDOWWIDTH/2, WINDOWHEIGHT/2)
DISPLAYSURF.blit(textSurfaceObj, textRectObj)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
if is_won(boxs):
fontObj = pygame.font.Font('freesansbold.ttf', 32)
textSurfaceObj = fontObj.render('YOU WON!', True, GREEN, BLUE)
textRectObj = textSurfaceObj.get_rect()
textRectObj.center = (WINDOWWIDTH/2, WINDOWHEIGHT/2)
DISPLAYSURF.blit(textSurfaceObj, textRectObj)
pygame.display.update()
lives = LIVES
pygame.time.wait(1000)
init_boxs_revealed(boxs)
#pygame.time.wait(500)
pygame.display.update()
FPSCLOCK.tick(FPS)
if __name__ == '__main__':
main()