def make_csv(tiles, width):
    """
    Takes a list of tiles and a width and returns a string of comma-separated values
    """
    csv = ""
    for i in range(0, len(tiles), width):
        csv += ",".join(str(t) for t in tiles[i:i+width])
        if i + width < len(tiles):
            csv += ',\n'
        else:
            csv += '\n'
    return csv