//designated constructor public Room(string tag) { exits = new Dictionary <string, Door>(); this.tag = tag; _delegate = null; itemContainer = new ItemContainer(); //uitemContainer = new UItemContainer(); }
public Door getExit(string exitName, IRoomDelagate rDelegate) { if (rDelegate == Delegate) { Door door = null; exits.TryGetValue(exitName, out door); return(door); } else { return(null); } }
public string getExits(IRoomDelagate rDelegate) { if (rDelegate == Delegate) { string exitNames = "Exits:"; Dictionary <string, Door> .KeyCollection keys = exits.Keys; foreach (string exitName in keys) { exitNames += " " + exitName; } return(exitNames); } else { return("???"); } }