code: def modify(board, opts=None):
      
      opts = get_opts(opts)
      if opts['board'] is not None:
          board.tiles = _read_tiles_from_string(opts['board'])
      else:
          board.tiles = _generate_tiles(opts['terrain'], opts['numbers'])
      board.ports = _get_ports(opts['ports'])
      board.state = catan.states.BoardStateModifiable(board)
      board.pieces = _get_pieces(board.tiles, board.ports, opts['players'], opts['pieces'])
      return None
docs: Reset an existing board using the given options.
      :param board: the board to reset
      :param opts: dictionary mapping str->Opt
      :return: None