//private void CheckNewLocation(IDweller dweller, IBuilding obj) //{ // if (dweller.Position.Value == obj.Position.Value) // { // // yep // dweller.EnterBuilding(obj); // } //} public void Add(IBuilding building) { switch (building) { case IHome home: Homes.Add(home); break; case IWorkplace workplace: Workplaces.Add(workplace); break; case ICafe cafe: Cafes.Add(cafe); break; } }
/// <summary> /// Add a cafe to the view model. /// </summary> /// <param name="cafe">The cafe to be added</param> public void AddCafeToModel(Cafe cafe) { Cafes.Add(cafe); }