예제 #1
0
        /// <summary>
        /// Adds a region to the continent, and check if it is a border region.
        /// </summary>
        /// <param name="region">Region.</param>
        public void AddRegion(Region region)
        {
            if (!Regions.Contains (region)) {
                Regions.Add (region);

                if (region.IsBorderRegion ()) {
                    BorderRegions.Add (region);
                }

                if (Logger.IsDebug ()) {
                    Logger.Debug (string.Format ("Continent:\tRegion {0} added to continent {1}", region.Id, Id));
                }
            }
        }
예제 #2
0
 /// <summary>
 /// Adds a region to the list of border region.
 /// </summary>
 /// <param name="region">Region.</param>
 public void AddBorderRegion(Region region)
 {
     if (!BorderRegions.Contains (region) && region.IsBorderRegion ()) {
         BorderRegions.Add (region);
     }
 }