Takes a string representing a CELL resource (as specified in Avida
    environment files) and a tuple representing the x and y dimensions of the
    world, and returns the name of the resource and a list of
    tuples representing the cells it's in.

def parse_cell(line, world_size):
    """
    Takes a string representing a CELL resource (as specified in Avida
    environment files) and a tuple representing the x and y dimensions of the
    world, and returns the name of the resource and a list of
    tuples representing the cells it's in.
    """
    # Remove "CELL "
    line = line[4:]

    # Extract information
    sline = [i.strip() for i in line.split(":")]
    name = sline[0]
    name = reduce_resource_name_to_task(name)
    cell_components = sline[1].split(",")
    cells = []

    # List all cells
    for i in range(len(cell_components)):
        if ".." in cell_components[i]:
            cell_range = [int(j) for j in cell_components[i].split("..")]
            for j in range(int(cell_range[0]), int(cell_range[1]+1)):
                cells.append(j)
        else:
            cells.append(int(cell_components[i]))

    if cells == [""]:
        return (name, [])

    xy_pairs = [(int(c) % world_size[0], int(c)//world_size[0]) for c in cells]

    return (name, xy_pairs)