Exemple #1
0
def finish_game_window():
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                aux.quit_game()

        aux.game_finish_text(screen)
        aux.button(screen, 'QUIT', 630, 450, 100, 50, colors.RED,
                   aux.quit_game)

        pygame.display.update()
        clock.tick(15)
def menu_window():
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                aux.quit_game()

        screen.fill(colors.WHITE)
        screen.blit(menu, (0, 0))

        aux.button(screen, 'START', 550, 55, 240, 100, colors.START, game_loop)
        pygame.display.update()
        clock.tick(15)
Exemple #3
0
def restart_game_window(player):
    restart_game = True

    while restart_game:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                quit_game()

        game_win_text(player)
        aux.button(screen, 'RESTART', 510, 450, 100, 50, colors.GREEN, game_loop)
        aux.button(screen, 'QUIT', 750, 450, 100, 50, colors.RED, quit_game)

        pygame.display.update()
        clock.tick(15)
Exemple #4
0
def menu_game_window():
    menu_game = True

    while menu_game:

        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                quit_game()

        screen.fill(colors.WHITE)
        screen.blit(menu, (0, 0))

        aux.button(screen, 'PLAY', 565, 450, 200, 120, colors.BRIGHT_YELLOW, game_loop)
        pygame.display.update()
        clock.tick(15)
Exemple #5
0
def restart_game_window(win):
    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                aux.quit_game()

        if win and level == 5:
            finish_game_window()

        aux.button(screen, 'RESTART', 510, 450, 100, 50, colors.GREEN,
                   game_loop)
        if win:
            aux.game_win_text(screen)
            aux.button(screen, 'NEXT', 630, 450, 100, 50, colors.BLUE,
                       next_level)
        else:
            aux.game_lose_text(screen)
        aux.button(screen, 'QUIT', 750, 450, 100, 50, colors.RED,
                   aux.quit_game)

        pygame.display.update()
        clock.tick(15)