Example #1
0
 public DNAEntry(string key, uint hashCode, int length, DNAEntry next)
 {
     Key       = key;
     HashCode  = hashCode;
     Positions = new DNAPos[length];
     Count     = 0;
     Next      = next;
 }
Example #2
0
 /// <summary>
 /// Add Posion
 /// </summary>
 /// <param name="x">X Posion</param>
 /// <param name="y">Y Posion</param>
 public void Add(int x, int y)
 {
     if (Count == Positions.Length)
     {
         Resize(Positions.Length + 100);
     }
     Positions[Count] = new DNAPos(x, y);
     Count++;
 }
Example #3
0
 private void Resize(int newSize)
 {
     if (newSize < Positions.Length)
     {
         return;
     }
     DNAPos[] newpos = new DNAPos[newSize];
     Array.Copy(Positions, newpos, Positions.Length);
     Positions = newpos;
 }