private void CalculateTimeForWeather(WeatherType weatherType)
 {
     Console.WriteLine("*********" + weatherType.ToString() + " Weather**********");
     foreach (Vehicle vehicle in _vehicles)
     {
         FastestPath(vehicle, weatherType);
     }
 }
Ejemplo n.º 2
0
        private string ConvertWeatherTypeToName(WeatherType type)
        {
            if (Enum.IsDefined(typeof(WeatherType), type) == false)
            {
                return(null);
            }

            return(type.ToString().ToUpperInvariant());
        }
Ejemplo n.º 3
0
 private void CalculateTimeForWeather(WeatherType weatherType)
 {
     Console.WriteLine("*********" + weatherType.ToString() + " Weather**********");
     foreach (Vehicle vehicle in _vehicles)
     {
         var res = ShortestPath(vehicle, weatherType, _weatherImpactList, _possiblePathList);
         PrintOutput(res, vehicle);
     }
 }
Ejemplo n.º 4
0
        public string ENVFileName(SeasonType seasonType, WeatherType weatherType)
        {
            //int index = (int)seasonType * 3 + (int)weatherType;
            //return ENVFileNames[index];
            var envfilekey = seasonType.ToString() + weatherType.ToString();
            var envfile    = ENVFileNames[envfilekey];

//            Trace.TraceInformation("Selected Environment file is {1}", envfilekey, envfile);
            return(envfile);
        }
Ejemplo n.º 5
0
 public void ShowWeather(WeatherType type)
 {
     if (this.HasWeatherSkill)
     {
         Debug.Log(this.ActorLogicData.Name + ": " + type.ToString());
         if (this.ShowWeatherEvent != null)
         {
             this.ShowWeatherEvent(type);
         }
     }
 }
Ejemplo n.º 6
0
        public string GetEnvironmentFileName(SeasonType seasonType, WeatherType weatherType)
        {
            string envfilekey = seasonType.ToString() + weatherType.ToString();

            return(fileNames[envfilekey]);
        }
Ejemplo n.º 7
0
        public static string GetWeatherEmojiIcon(this WeatherType weather)
        {
            var key       = $"weather_{Convert.ToInt32(weather)}";
            var emojiId   = MasterFile.Instance.Emojis[key];
            var emojiName = emojiId > 0 ? string.Format(Strings.EmojiSchema, key, emojiId) : weather.ToString();

            return(emojiName);
        }
Ejemplo n.º 8
0
 public override string ToString()
 {
     return(loc + " " + weather.ToString());
 }
Ejemplo n.º 9
0
 public void ShowWeather(WeatherType type)
 {
     if (this.HasWeatherSkill )
     {
         Debug.Log(this.ActorLogicData.Name + ": " + type.ToString());
         if (this.ShowWeatherEvent != null)
         {
             this.ShowWeatherEvent(type);
         }
     }
 }