def generate_points_list(database):
    """
    Generates a list of points from the database dictionary

    Args:
        database (dict): a database dict that was loaded from a .json annotation file

    Returns:
        list: of lists being points as [[set_score, game_score, point_score, start, end], ..., ]
    """

    points = []
    for point in database['classes']['Point']:
        point_score = str(point['custom']['Score'])  # the point score after point as 30-0 or 40-A or Game or Deuce etc.
        point_start = int(point['start'])  # the frame the point starts
        point_end = int(point['end'])  # the frame the point ends

        # make the set score by working out where a point fits in time eg. 1-0 or 0-2 etc.
        set_score = ''
        for set_ in database['classes']['Set']:
            score = str(set_['custom']['Score'])
            set_start = int(set_['start'])
            set_end = int(set_['end'])
            if set_start <= point_start <= set_end or set_start <= point_end <= set_end:
                set_score = score

        # similarily make the game score using point frame stamp eg. 1-0 or 4-4 or 6-4 etc.
        game_score = ''
        for game in database['classes']['Game']:
            score = str(game['custom']['Score'])
            game_start = int(game['start'])
            game_end = int(game['end'])
            if game_start <= point_start <= game_end or game_start <= point_end <= game_end:
                game_score = score

        # add to the points list
        points.append([set_score, game_score, point_score, point_start, point_end, point['name']])

    return points