Hi,
I'm trying to create a textgame in python, and after searching for a few topics about it I though I knew how to make it. Many textgames use a system like this:
def room_one():
#do stuff
if something:
room_two()
def room_two():
#do stuff
Most of the time the functions are alliterating until the player enters a command the game knows.
This works fine and all, but I just realized that using this system will result in a sort of recursion between functions. When you let the player go to another room, the function calling that function is not closed/ended yet.
So my questions are: Am I correct about this? Is this bad at all? If so, how would I solve this, or is there a better way to make a textgame?
Thanks,
Lapixx