def list_between(begin, end, r):
    """Returns the list of players from begin to end (inclusive)."""
    if begin <= end:
        return list(range(begin, end+1))
    return list(range(begin, r.nPlayers)) + list(range(end+1))