unit4_pp/scripts/unit4_exercise_server.py
def indexToGridCell(flat_map_index, map_width):
  """
  Converts a linear index of a flat map to grid cell coordinate values
  flat_map_index: a linear index value, specifying a cell/pixel in an 1-D array
  map_width: the map's width 
  returns: list with [x,y] grid cell coordinates
  """
  grid_cell_map_x = flat_map_index % map_width
  grid_cell_map_y = flat_map_index // map_width
  return [grid_cell_map_x, grid_cell_map_y]

  Converts a linear index of a flat map to grid cell coordinate values
  flat_map_index: a linear index value, specifying a cell/pixel in an 1-D array
  map_width: the map's width 
  returns: list with [x,y] grid cell coordinates
  
Converts a linear index of a flat map to grid cell coordinate values
flat_map_index: a linear index value, specifying a cell/pixel in an 1-D array
map_width: the map's width
returns: list with [x,y] grid cell coordinates
Converts a linear index of a flat map to grid cell coordinate values flat_map_index : a linear index value specifying a cell / pixel in an 1 - D array map_width : the map ' s width returns : list with [ x y ] grid cell coordinates
def indexToGridCell(flat_map_index, map_width):
  grid_cell_map_x = flat_map_index % map_width
  grid_cell_map_y = flat_map_index // map_width
  return [grid_cell_map_x, grid_cell_map_y]
def indexToGridCell ( flat_map_index , map_width ) : grid_cell_map_x = flat_map_index % map_width grid_cell_map_y = flat_map_index // map_width return [ grid_cell_map_x , grid_cell_map_y ]
Converts a linear index of a flat map to grid cell coordinate values
flat_map_index: a linear index value, specifying a cell/pixel in an 1-D array
map_width: the map's width
returns: list with [x,y] grid cell coordinates
Converts a linear index of a flat map to grid cell coordinate values flat_map_index : a linear index value specifying a cell / pixel in an 1 - D array map_width : the map ' s width returns : list with [ x y ] grid cell coordinates
"""
  Converts a linear index of a flat map to grid cell coordinate values
  flat_map_index: a linear index value, specifying a cell/pixel in an 1-D array
  map_width: the map's width 
  returns: list with [x,y] grid cell coordinates
  """
flat_map_index
map_width