Example #1
0
        /// <summary>
        /// Builds a city on the case on which the given teacher stands.
        /// Note: this should not be in this class. Refactoring needed.
        /// </summary>
        /// <param name="name">Name of the city.</param>
        /// <param name="teacher">Teacher building the city.</param>
        public void BuildCity(Unit teacher)
        {
            Player player   = teacher.Player;
            Case   position = teacher.Location;

            City city = new City(position, player, map.TerritoryAround(position, City.Radius));

            position.BuildCity(city);
            player.AddCity(city);

            // The teacher sacrifices himself to build the city (may he rest in peace).
            teacher.Kill();
        }