Exemplo n.º 1
0
 public virtual void createCity(IPlayer currPlayer, String name)
 {
     City newCity = new City(currPlayer, Case);
     newCity.Name = name;
     Case.City = newCity;
     currPlayer.Cities.Add(newCity);
     Case.removeUnit(this);
 }
Exemplo n.º 2
0
        public CityViewModel(City c)
        {
            c.PropertyChanged += new PropertyChangedEventHandler(delegate(object sender, PropertyChangedEventArgs args)
            {
                Name = ((City)sender).Name;
                Population = populationLabel(((City)sender).Population);
                OwnedMinerals = ownedMineralsLabel(((City)sender).OwnedMinerals);
                OwnedFoods = ownedMineralsLabel(((City)sender).OwnedFoods);
            });

            Name = c.Name;
            Population = populationLabel(c.Population);
            OwnedMinerals = ownedMineralsLabel(c.OwnedMinerals);
            OwnedFoods = ownedMineralsLabel(c.OwnedFoods);
        }