public ParentNode()
 {
     cn = new ChildNode[1000];
     for (int i = 0; i < 1000; i++)
     {
         cn[i] = new ChildNode();
         cn[i].namakota = "";
         cn[i].jarak = -1;
     }
 }
Exemplo n.º 2
0
 public ParentNode()
 {
     cn = new ChildNode[1000];
     for (int i = 0; i < 1000; i++)
     {
         cn[i]          = new ChildNode();
         cn[i].namakota = "";
         cn[i].jarak    = -1;
     }
 }
 public void addchild(string namakotanya,int jaraknya)
 {
     for (int i = 0; i < 1000; i++)
     {
         if(cn[i].namakota.Equals(""))
         {
             cn[i] = new ChildNode();
             cn[i].namakota = namakotanya;
             cn[i].jarak = jaraknya;
             break;
         }
     }
 }
Exemplo n.º 4
0
 public void addchild(string namakotanya, int jaraknya)
 {
     for (int i = 0; i < 1000; i++)
     {
         if (cn[i].namakota.Equals(""))
         {
             cn[i]          = new ChildNode();
             cn[i].namakota = namakotanya;
             cn[i].jarak    = jaraknya;
             break;
         }
     }
 }