import random


def gen_next_match_pick_randomly(population):
    """ Decides next two player indexes who will play against each other by randomly selecting two players
    from the list of players available"""
    available_players = [player for player in population if player.available]

    p1 = random.choice(available_players)
    available_players.remove(p1)
    p2 = random.choice(available_players)
    return p1, p2