Skip to content

Commit 639b6d3

Browse files
Overriding Description so that rooms with exterior doors describe the door.
1 parent bb2351d commit 639b6d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

VS2013/Chapter_7/HideAndSeek/HideAndSeek/RoomWithDoor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@ public RoomWithDoor(string name, string decoration,
1818
public string DoorDescription { get; private set; }
1919

2020
public Location DoorLocation { get; set; }
21+
22+
public override string Description
23+
{
24+
get { return base.Description + " You see " + DoorDescription + "."; }
25+
}
2126
}
2227
}

0 commit comments

Comments
 (0)