Reputation: 11
I have gone through many of these threads with rooms but it still has not answered my question.
I want to define 5 rooms with items each inside it without the program being recursive. At the rate I am going it will take forever. The code is unfinished but you will see what I mean.
print("""
You enter the simulation. You look forward around you and examine the walls around the maze you are about to step foot into
Will you go forward? (Yes/No)
""")
ans1 = input("> ")
if ans1 in answer_yes:
print("You walk forward and enter the maze. You run into a room with 3 doors. Will you choose (Door 1/Door 2/Door 3)\n")
ans2 = input("> ")
if ans2 in answer_door3:
print("This door seems to lead down into a pitch black, empty hall. Would you like to proceed? (Yes/No)")
ans3 = input("> ")
if ans3 in answer_yes:
print("The hall does not seem to stop. You might want to turn around.")
elif ans1 in answer_no:
print("You can wait here forever then. They will never let you out! Will you go? (Yes/No)")
ans3= input("> ")
else:
print("Wrong input, please try again.")
I want to make it so I start in a certain room and that room has 4 doors which all lead to a certain area and have these rooms connect if the user follows the "correct" path.
I started by defining the rooms.
rooms = {'Auditorium', 'Kitchen', 'Bedroom 1', 'Bedroom 2', 'Computing Room'}
Have 0 clue what to do from here.
Upvotes: 1
Views: 95