This is the first site that I found with only programming...well I did find one that had prety much every "popular" language for sub-forums, but that wasn't it's main subject. Most of the people posted there were newbies, and the ones who weren't weren't on often.
Anyway, I'm making a game. It's a prety cool game if you ask me? LMAO who wouldn't say their own ideas aren't cool at first. Well you start as this "guy" who doesn't remember anything...like he was just born. He's in a church, holy edifice, whatever you want to call it, it doesn't actually give it a name, it's really not that important of a building...kinda. Anyway, you can't get out until you talk to this old priest, holyman, again no designation is given in the game, until later but even that has nothign to do with it. He asks you to help him find something, well pieces of something. He says he's not young enough and then you start on your first quest of finding this thing. After you find all the pieces he will have it fixed and tell you to wander the "church." So you do until you reach a certain room (where in graphical games there would be a IN-GAME MOVIE (only you think you are asleep and crazy $$$$ like that...anymore will ruin the plot...So far I have a guy that can do stuff in a single room (I'm working on the rooms (it's going to be liek a bin tree only with more than just left and right) I discovered that it's harder than I thought at first and I came up with several solutions. All of which seem to have tiny flaws. One is having on epointer for each row of rooms (like a linked list) ONLY all of the pointers move in unicen when making the rooms at the start of the program...kinda. They move ahead one by one but only move once until all of the other pointers are "equal" in their line. Hmm why did I end up going over this crap...ah well I lost where I was...oh yeah well that's one way,. I'm trying to figure out a way I can do it mathematically and only have two or three points for ANY amount of rooms, one pointer being the first room and one being the one you're working with and another (maybe two) being the previous room and next room. That's what I'm working on now :D...
Graphs would be a good way of doing it. You can read a little about graphs here:
This way when you are in a given node ( room ) you can tell the other rooms which you are able to travel to. Hopefully this will help you some.