Don't worry
too much about this. I'm posting it just to be informative. It's good to know, but you may not be ready for it yet:
Having a function for each location and calling them from each other this way may seem like a good idea, but it has some very serious problems, and intermediate/advanced programmers don't design games this way.
One problem is that it assumes that every location has one entry point, and must exit through that entry point. For a simple example, let's say that:
You can enter Town() from Overworld()
You can enter Inn() from Town()
You can enter Cellar() from Inn()
You can enter Town() from Cellar() (via some secret back exit or something).
How can you handle this problem? Cellar can't call Town() because if it does, when you exit the town you will go back to the cellar (instead of going back to the Overworld). Also, if the player decides to be cute and go town->inn->cellar->town->inn->cellar->etc, you will eventually consume all your stack space and the program will crash.
Another problem is that is makes you hardcode everything. Say for example you want a few commands that are common to every screen, such as inputting 'i' to check your inventory. If each location has its own code to run the menu, then you have to add this command to every single location. What if you have 20+ locations then decide you want to add a new common command? Or change the way a command works? That's a lot of code you have to change. It's also very easy to "miss" one and have your command broken, but only in one location.
Therefore, the typical way to do things is to write code once, and have that code apply to
every location. The actual information about the location could be stored in variables, rather than being hardcoded into the game logic.
Getting this right with most genres is easy, as there is usually very little change in program flow through the game. But for heavily event-driven text adventure games, it's actually surprisingly difficult to design a data structure that can cover all game events in a common way. In a sense... this makes Text Adventure games
harder to write than many other kinds of games, like a simple vertical shooter (Space Invaders clone or something).
I walked one guy through an example of how to design a dynamic text adventure in the below thread. Something like that is probably how most more-experienced programmers would approach the game. You might find it to be informative/interesting:
http://www.cplusplus.com/forum/beginner/71141/#msg379639