예제 #1
0
        /// <summary>
        /// Converts this individual to a map based on the base map included in the map search options.
        /// </summary>
        /// <returns> The <see cref="MapPhenotype"/> that corresponds to this individual.</returns>
        public MapPhenotype ConvertToPhenotype()
        {
            var map = MapConversionHelper.ConvertToPhenotype(this.MapPoints, this.MapSearchOptions, this.Random);

            this.ConvertedPhenotype = map.CreateFinishedMap(Enums.Half.Top, this.MapSearchOptions.MapCompletion);
            this.hasBeenConverted   = true;
            return(this.ConvertedPhenotype);
        }
예제 #2
0
        /// <summary>
        /// Converts this individual onto an empty map.
        /// </summary>
        /// <param name="xSize"> The width of the map. </param>
        /// <param name="ySize"> The height of the map. </param>
        /// <returns> The <see cref="MapPhenotype"/> that corresponds to this individual.</returns>
        public MapPhenotype ConvertToPhenotype(int xSize, int ySize)
        {
            var map = new MapPhenotype(ySize, xSize);

            map = MapConversionHelper.ConvertToPhenotype(this.MapPoints, new MapSearchOptions(map, MapSearchOptions), this.Random);

            return(map);
        }
예제 #3
0
        /// <summary>
        /// Converts this individual onto a specific map.
        /// </summary>
        /// <param name="map"> The map to convert this individual onto. </param>
        /// <returns> The <see cref="MapPhenotype"/> that corresponds to this individual.</returns>
        public MapPhenotype ConvertToPhenotype(MapPhenotype map)
        {
            map = MapConversionHelper.ConvertToPhenotype(this.MapPoints, new MapSearchOptions(map, this.MapSearchOptions), this.Random);

            return(map);
        }