   How to initialize a world
  Hi, I am considering a way to set up my world as followsThe world is comprised of many Map classeseach Map has Map* exitsthat points to the Map of the linking area.I'm hoping to do something like character.move(character.currentmap->exit[0])to move a character to the next map;I'm thinking of recursively initializing linked area with something like    while (lua_next(L, -2) != 0) {   /* uses 'key' (at index -2) and 'value' (at index -1) */   //add your own code to get the key and value   exits_scrpt = lua_tostring(L, -1);   cout <<"exits:"<<exits_scrpt<<endl;   exits = new Map(exits_scrpt,i,exits);   //here I provided an index, the script to load from, and the pointer to the current map to the next one   exits++;   i++;   /* removes 'value'; keeps 'key' for next iteration */   lua_pop(L, 1);    }and link back to this map using the code in constructor.But then I realized there would be problems when two or more maps link to the same map, in which case, another instance of that map will be created and that is not desired.Do you think this way would work? Or should I just assign an id to a map and use the ids to find the maps to be operated on?   
  Recursive initialization sounds scary, for maps that can link back and forth to eachother in any order. ID values would be a good choice. Or you could do a 2 pass initialization, where the first pass creates all the maps, and the second pass sets the exit pointers. But that usually requires ID values anyway, since you need some way of finding the already-created maps that the current one links to.   ;  yeah, that's what I was consideringI think I'll organize all the related maps under an Area struct, and assign IDs within an area   