def place_cells_on_array(self, set_of_cells, array): """Places cells on array based on the coordinates contained in each cell. Returns array with cells.""" for cell in set_of_cells: (x,y) = cell.get_cell_coords() array[x][y] = cell return array
def convert_cells_to_coords(self, set_of_cells): """Given a set of cell objects, returns a set of tuples representing the cell\'s coordinates.""" set_of_cell_coords = set() for cell in set_of_cells: set_of_cell_coords.add(cell.get_cell_coords()) return set_of_cell_coords