adding location stuff
This commit is contained in:
@@ -1,7 +1,11 @@
|
|||||||
|
using PeopleVille.Persons;
|
||||||
|
|
||||||
namespace PeopleVille.Locations
|
namespace PeopleVille.Locations
|
||||||
{
|
{
|
||||||
public abstract class Location
|
public abstract class Location
|
||||||
{
|
{
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
public virtual void UseLocation(Person person) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,6 +26,7 @@ namespace PeopleVille.Persons
|
|||||||
public void Walk(Location newLocation)
|
public void Walk(Location newLocation)
|
||||||
{
|
{
|
||||||
this.CurrentLocation = newLocation;
|
this.CurrentLocation = newLocation;
|
||||||
|
newLocation.UseLocation(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user