Basic MU* Style Movement
c0dezer019
python
2 years ago
549 B
14
Indexable
rooms = {
"Bridge": {
"aft": "Turbolift",
"port": "Ready Room"
},
"Ready Room": {
"starboard": "Bridge"
},
"Turbolift": {
"forward": "Bridge"
}
}
current_loc = rooms['Bridge']
def movement(direction):
global current_loc
if direction in current_loc.keys():
new_loc = current_loc[direction]
current_loc = rooms[new_loc]
print(f'you are now in the {new_loc}')
else:
print("You are unable to go there.")
move = input('Move: ')
movement(move)
Editor is loading...
Leave a Comment