Advertisement
Txemin

Untitled

May 21st, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. class Room():
  2. def __init__(self, room_name):
  3. self.name = room_name
  4. self.description = None
  5. self.linked_rooms = {}
  6.  
  7. def set_description(self, room_description):
  8. self.description = room_description
  9.  
  10. def get_description(self):
  11. return self.description
  12.  
  13. def set_name(self, room_name):
  14. self.name = room_name
  15.  
  16. def get_name(self):
  17. return self.name
  18.  
  19. def describe(self, description):
  20. print(self.description)
  21.  
  22. def linked_room(self, room_to_link, direction):
  23. self.linked_room[direction] = room_to_link
  24. print(self.name + "linked room " + repr(self.linked_room))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement