Example #1
0
        public int HabitiationParameter(HabitationParameterType habitationParameterType)
        {
            switch (habitationParameterType)
            {
            case HabitationParameterType.Gravity:
            case HabitationParameterType.Temperature:
                return((int)Math.Round(TrapezoidalDistribution.Sample(this.rng, -49.5, 49.5, -40, 40)));

            case HabitationParameterType.Radiation:
                return((int)Math.Round(ContinuousUniformDistribution.Sample(this.rng, -49.5, 49.5)));

            default:
                throw new ArgumentOutOfRangeException(nameof(habitationParameterType), habitationParameterType, null);
            }
        }
        private static string GetGraphStrokeColor(HabitationParameterType parameterType)
        {
            ////TODO: refactor to use converters and styles instead
            switch (parameterType)
            {
            case HabitationParameterType.Gravity:
                return("Blue");

            case HabitationParameterType.Temperature:
                return("Red");

            case HabitationParameterType.Radiation:
                return("LightGreen");

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Example #3
0
 public int GetMaxTerraformTech(HabitationParameterType type)
 {
     return(20); ////TODO
 }