I am trying to make an old-school game, much like the original Zork. I need to generate a world and I have been told that a linked list may be the best way to go if the character is only moving in the cardinal directions. So therefore I would need a two-dimensional linked list and I haven't the slightest clue as to how to make one. To keep it simple at first, would I declare the struct like this?
1 2 3 4 5 6 7 8 9
struct world{
string location;
string description;
world *north;
world *south;
world *east;
world *west;
world *link;
};
Sorry if that's way off... I'm kind of lost here. From there what would be the first major step to take?
Hmmm, well let me ask this. What would be the easiest way to generate a 3-dimensional map for a text-based game assuming the only movement allowed is north, south, east, west, up, down?
I would use an array but I need to be able to store more than one value per cell.
Not looking for any code at this point but if anybody could point me in the right direction or needs more information from me please let me know.