def get_next_player(players, currentplayer):
    """Returns the next player in an ordered list.
    Cycles around to the beginning of the list if reaching the end.

    Args:
        players -- List
        currentplayer -- Element in the list
    """
    i = players.index(currentplayer) + 1
    return players[i % len(players)]