Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def show_status():
- print("nThis is the " + rooms[current_room]["name"])
- rooms = {
- 1 : { "name" : "Highway" ,
- "west" : 2 ,
- "east" : 2 ,
- "north": 2 ,
- "south": 2} ,
- 2 : { "name" : "Forest" ,
- "west" : 1 ,
- "east" : 1 ,
- "north": 1 ,
- "south": 1} ,
- }
- current_room = 1
- while True:
- show_status()
- move = input(">> ").lower().split()
- if move[0] == "go":
- if move[1] in rooms[current_room]:
- current_room = rooms[current_room][move[1]]
- else:
- print("you can't go that way!")
- else:
- print("You didn't type anything!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement