コード例 #1
0
 /// <summary>
 /// Alternate Constructor for the Enviroment Class
 /// </summary>
 /// <param name="name">Name of Enviroment</param>
 /// <param name="startingTemp">Temperature that the enviroment will start at</param>
 /// <param name="substancesFileName">File name of the file where the substances data for the enviroment is stored</param>
 /// <param name="speciesFileName">Name of file where the data for the species that will live in the enviroment is stored</param>
 /// <param name="volume">Total Enviroment of the Enviroment</param>
 public Enviroment(string name, int startingTemp, string substancesFileName, string speciesFileName, int volume)
 {
     this.name        = name;
     this.temperature = startingTemp;
     this.substances  = TextParsers.ParseSubstances(substancesFileName);
     this.species     = TextParsers.ParseSpecies(speciesFileName);
     this.volume      = volume;
 }
コード例 #2
0
 /// <summary>
 /// Constructor for Enviroment class
 /// </summary>
 /// <param name="name">Name of Enviroment</param>
 /// <param name="startingTemp">Temperature that the enviroment will start at</param>
 /// <param name="substancesFileName">File name of the file where the substances data for the enviroment is stored</param>
 /// <param name="speciesFileName">Name of file where the data for the species that will live in the enviroment is stored</param>
 /// <param name="length">Length of the enviroment</param>
 /// <param name="width">Width of the enviroment</param>
 /// <param name="height">Height of the enviroment</param>
 public Enviroment(string name, int startingTemp, string substancesFileName, string speciesFileName, int length, int width, int height)
 {
     this.name        = name;
     this.temperature = startingTemp;
     this.currentTime = 0;
     substances       = TextParsers.ParseSubstances(substancesFileName);
     species          = TextParsers.ParseSpecies(speciesFileName);
     this.volume      = length * width * height;
 }
コード例 #3
0
 public static void GetAllSubstancesFromFile()
 {
     allSubstances = TextParsers.ParseSubstances(substancesFile);
 }