Advertisement
messimmous

Untitled

Oct 10th, 2015
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1.  private void Deep(int i, int[] resArray)
  2.         {
  3.             Stack<int> myStack = new Stack<int>();
  4.             myStack.Push(i);
  5.             int walkN = 0;
  6.             while (myStack.Count != 0)
  7.             {
  8.                 int tmp = myStack.Pop();
  9.                 if (!MasCheck(resArray, tmp))
  10.                 {
  11.                     resArray[walkN] = tmp;
  12.                     UsuallyStorage.GetCCircle(tmp).ChangeNumero(walkN + 1);
  13.                     foreach (int nei in UsuallyStorage.GetCCircle(tmp).Neighbours)
  14.                     {
  15.                         /*if (!MasCheck(resArray, nei))
  16.                         {*/
  17.                             myStack.Push(nei);
  18.                         //}
  19.                     }
  20.                     walkN++;
  21.                 }
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement