def levelcomplete(events, screen):
    global screen_snapshot, score

    game_mode = "LEVELCOMPLETE"

    for event in events:
        if event.type == pygame.KEYDOWN and event.key == pygame.K_r:
            start_level()
            game_mode = "DUNGEON"
            return game_mode
        if event.type == pygame.KEYDOWN and event.key == pygame.K_x:
            game_mode = "EXIT"
            return game_mode

    # Update animation
    # Nothing to animate yet ...

    # Draw
    screen.fill(common.BLACK)
    if screen_snapshot is not None:
        screen.blit(screen_snapshot, [0, 0])

    textimage.draw(screen, textimage.levelcomplete)

    return game_mode
def paused(events, screen):
    global screen_snapshot

    game_mode = "PAUSED"

    for event in events:
        if event.type == pygame.KEYDOWN and event.key == pygame.K_p:
            game_mode = "DUNGEON"
            return game_mode
        if event.type == pygame.KEYDOWN and event.key == pygame.K_x:
            game_mode = "EXIT"
            return game_mode

    # Update animation
    # Nothing to animate yet ...

    # Draw
    screen.fill(common.BLACK)
    if screen_snapshot is not None:
        screen.blit(screen_snapshot, [0, 0])
    textimage.draw(screen, textimage.pause)

    return game_mode