I have attempted changing the rooms around and for some reason I always get an output of You cant go that way, please choose a new direction!, or Invalid entry. I have not been able to move rooms. What should am I doing wrong? I dont know what I am doing and people are so rude.
rooms = {
'Great Hall': {'South': 'Bedroom'},
'Bedroom': {'North': 'Great Hall', 'East': 'Cellar'},
'Cellar': {'West': 'Bedroom'}
}
place = 'Great Hall'
def go_new_place(place, direction):
new_place = place
for i in rooms:
if i == place:
if direction in rooms[i]:
new_place = rooms[i][direction]
return new_place
while 1:
print('You are in', place)
direction = input('Which direction would you like to go? Or do you wish to exit?')
if direction == 'Exit':
exit(0)
if direction == 'North' or 'South' or 'West' or 'East':
new_place = go_new_place(place, direction)
if new_place == place:
print('You cant go that way, please choose a new direction!')
else:
place = new_place
else:
print('Invalid entry!')