From 61222df6d16fcf74f324186e5f10d9e868be43b2 Mon Sep 17 00:00:00 2001 From: smallbenji Date: Thu, 26 Mar 2026 13:01:50 +0100 Subject: [PATCH] adding location stuff --- PeopleVille/Location/ILocation.cs | 4 ++++ PeopleVille/Person/Person.cs | 1 + 2 files changed, 5 insertions(+) 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