Esempio n. 1
0
 /// <summary>
 ///     Add the properties of another cell to this one.
 /// </summary>
 /// <param name="otherCell">The other cell.</param>
 public void Add(UniverseCell otherCell)
 {
     for (int i = 0; i < _prop.Length; i++)
     {
         _prop[i] += otherCell.Data[i];
     }
 }
Esempio n. 2
0
 /// <summary>
 ///     The constructor.
 /// </summary>
 /// <param name="height">The universe height.</param>
 /// <param name="width">The universe width.</param>
 /// <param name="theSize">The number of dimensions in a universe cell.</param>
 public UniverseHolder(int height, int width, int theSize)
 {
     _cellSize = theSize;
     _data     = new UniverseCell[height][];
     for (int row = 0; row < height; row++)
     {
         _data[row] = new UniverseCell[width];
         for (int col = 0; col < width; col++)
         {
             _data[row][col] = new UniverseCell(theSize);
         }
     }
 }
Esempio n. 3
0
 /// <summary>
 ///     The constructor.
 /// </summary>
 /// <param name="height">The universe height.</param>
 /// <param name="width">The universe width.</param>
 /// <param name="theSize">The number of dimensions in a universe cell.</param>
 public UniverseHolder(int height, int width, int theSize)
 {
     _cellSize = theSize;
     _data = new UniverseCell[height][];
     for (int row = 0; row < height; row++)
     {
         _data[row] = new UniverseCell[width];
         for (int col = 0; col < width; col++)
         {
             _data[row][col] = new UniverseCell(theSize);
         }
     }
 }
Esempio n. 4
0
 /// <summary>
 ///     Add the properties of another cell to this one.
 /// </summary>
 /// <param name="otherCell">The other cell.</param>
 public void Add(UniverseCell otherCell)
 {
     for (int i = 0; i < _prop.Length; i++)
     {
         _prop[i] += otherCell.Data[i];
     }
 }