Faiakes

room

Jul 10th, 2019
430
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. class Room():
  2.     def __init__(self, room_name):
  3.         self.name = None
  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, name):
  17.         return self.name
  18.  
  19.     def describe(self):
  20.         print(self.description)
  21.        
  22.     def link_room(self, room_to_link, direction):
  23.         self.linked_rooms[direction] = room_to_link
Add Comment
Please, Sign In to add comment