diff --git a/PeopleVille/Location/ILocation.cs b/PeopleVille/Location/ILocation.cs index f56c97a..c240380 100644 --- a/PeopleVille/Location/ILocation.cs +++ b/PeopleVille/Location/ILocation.cs @@ -1,7 +1,11 @@ +using PeopleVille.Persons; + namespace PeopleVille.Locations { public abstract class Location { public string Name { get; set; } + + public virtual void UseLocation(Person person) {} } } \ No newline at end of file diff --git a/PeopleVille/Person/Person.cs b/PeopleVille/Person/Person.cs index 8772ecb..a4f429f 100644 --- a/PeopleVille/Person/Person.cs +++ b/PeopleVille/Person/Person.cs @@ -26,6 +26,7 @@ namespace PeopleVille.Persons public void Walk(Location newLocation) { this.CurrentLocation = newLocation; + newLocation.UseLocation(this); } } } \ No newline at end of file