Пример #1
0
 /// <summary>
 /// Constructs variables and allocates space for persistent variables.
 /// </summary>
 private static void ConstructData()
 {
     BasePoint.MapSetup(rules.xHalfSize, rules.ySize);
     point = new BasePoint[2 * rules.xHalfSize, rules.ySize];
     for (int x = 0; x < 2 * rules.xHalfSize; x++)
     {
         for (int y = 0; y < rules.ySize; y++)
         {
             point[x, y] = new BasePoint(x, y);
         }
     }
 }
Пример #2
0
 /// <summary>
 /// Starts up and allocates data arrays.
 /// </summary>
 private static void ConstructData()
 {
     BasePoint.MapSetup(rules.xHalfSize, rules.ySize);
     pointActives            = new bool[2 * rules.xHalfSize, rules.ySize];
     pointHistories          = new PlatePoint[2 * rules.xHalfSize, rules.ySize];
     newContinentalCollision = new int[2 * rules.xHalfSize, rules.ySize];
     newOceanicCollision     = new int[2 * rules.xHalfSize, rules.ySize];
     nearPoints = new AdjacentPoints[2 * rules.xHalfSize, rules.ySize];
     plates     = new Plate[rules.plateCount];
     for (int i = 0; i < rules.plateCount; i++)
     {
         plates[i] = new Plate();
     }
 }
 /// <summary>
 /// Constructs data arrays.
 /// </summary>
 private static void ConstructData()
 {
     BasePoint.MapSetup(rules.xHalfSize, rules.ySize);
     points     = new BasePoint[2 * rules.xHalfSize, rules.ySize];
     waterFlow  = new double[2 * rules.xHalfSize, rules.ySize];
     waterArea  = new double[2 * rules.xHalfSize, rules.ySize];
     lakePoints = new List <KeyPoint>();
     for (int x = 0; x < 2 * rules.xHalfSize; x++)
     {
         for (int y = 0; y < rules.ySize; y++)
         {
             points[x, y] = new BasePoint(x, y);
         }
     }
 }
Пример #4
0
 /// <summary>
 /// Starts up and allocates data arrays.
 /// </summary>
 /// <param name="inRules">Rules to use for constructing data.</param>
 private static void ConstructData(GenerateRules inRules)
 {
     rules = inRules;
     BasePoint.MapSetup(rules.xHalfSize, rules.ySize);
     pointMap        = new BasePoint[2 * rules.xHalfSize, rules.ySize];
     pointMagnitudes = new double[2 * rules.xHalfSize, rules.ySize];
     pointActives    = new bool[2 * rules.xHalfSize, rules.ySize];
     platePoints     = new List <KeyPoint> [rules.plateCount];
     for (int i = 0; i < rules.plateCount; i++)
     {
         platePoints[i] = new List <KeyPoint>();
     }
     Parallel.For(0, (2 * rules.xHalfSize), (x) =>
     {
         for (int y = 0; y < rules.ySize; y++)
         {
             pointMap[x, y] = new BasePoint(x, y);
         }
     });
 }