Beispiel #1
0
        //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;
            }
        }
Beispiel #2
0
        /// <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);
        }