예제 #1
0
        public override string ToString()
        {
            string str = string.Format("{0}RP\t{1}\t{2}\t{3}",
                                       ResourceValue,
                                       StringExtensions.SpaceUppercaseLetters(CelestialType.ToString()),
                                       StringExtensions.SpaceUppercaseLetters(TerraformingTier.ToString()),
                                       StringExtensions.SpaceUppercaseLetters(StageOfLife.ToString()));

            if (Sentients.Count > 0)
            {
                //str += "\n\tSentients";
                str += "\n";
                foreach (var sentient in Sentients)
                {
                    str += string.Format("\t{0}\n", sentient);
                }
            }

            if (OrbitingSatellites.Count > 0)
            {
                //str += "\n\tSatellites";
                str += "\n";
                foreach (var satellite in OrbitingSatellites)
                {
                    str += string.Format("\t{0}\n", satellite);
                }
            }

            return(str);
        }
예제 #2
0
 public Animal(string GeneratedName, int GeneratedAge, bool LaysEggsVal, float GeneratedTemp, string ChosenDiet, int ChosenAgeofFertility, bool ChosenDiseaseStatus, float[] GeneratedDimensions, bool SearchingforMateStatus)
 {
     Name            = GeneratedName;
     Age             = GeneratedAge;
     StageofLife     = (StageOfLife)1; // this will depend on the age as well but we could have an if statement check a passed variable that shows the typical ages and then determine if it is or isn't. An array sounds good for this but it depends on how we want to do this.
     Health          = 100;
     LaysEggs        = LaysEggsVal;
     Temperature     = GeneratedTemp;
     FoodStatus      = 5;
     Diet            = ChosenDiet;
     IsMature        = false;        //We can have an if statement which chooses the maturity depending on the age. For now I'll just leave as false, so that it looks nicer.
     AgeOfFertility  = ChosenAgeofFertility;
     HavingOffspring = false;
     Dimensions      = GeneratedDimensions;
     HasDisease      = ChosenDiseaseStatus;
     AmountOfEggs    = 0;
 }